home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 July / Macworld (1999-07).dmg / Shareware World / Info / For Developers / Mops 3.4.sea / Mops source / PPC source / cg-regs < prev    next >
MacBinary  |  1998-11-03  |  47.6 KB  |  [TEXT/MSET]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Tue Nov 3 20:41:03 1998, modified Tue Nov 3 20:41:03 1998, creator 'MSET', type ASCII, 48161 bytes "cg-regs" , at 0xbca1 381 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MSET]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 07 63 67 2d 72 65 67 | 73 00 00 00 00 00 00 00 |..cg-reg|s.......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 53 45 | 54 01 00 00 00 00 00 00 |.TEXTMSE|T.......|
|00000050| 00 00 00 00 00 bc 21 00 | 00 01 7d b2 65 61 2f b2 |......!.|..}.ea/.|
|00000060| 65 61 2f 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |ea/.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 56 0d 00 00 |........|....V...|
|00000080| 6d 61 72 6b 65 72 20 6d | 5f 5f 63 67 2d 72 65 67 |marker m|__cg-reg|
|00000090| 73 0d 0d 50 50 43 3f 0d | 5b 49 46 5d 0d 66 61 6c |s..PPC?.|[IF].fal|
|000000a0| 73 65 09 63 6f 6e 73 74 | 61 6e 74 09 64 65 62 75 |se.const|ant.debu|
|000000b0| 67 3f 0d 66 61 6c 73 65 | 09 63 6f 6e 73 74 61 6e |g?.false|.constan|
|000000c0| 74 09 72 65 63 6f 6d 70 | 54 65 73 74 3f 0d 5b 45 |t.recomp|Test?.[E|
|000000d0| 4c 53 45 5d 0d 66 61 6c | 73 65 09 63 6f 6e 73 74 |LSE].fal|se.const|
|000000e0| 61 6e 74 09 64 65 62 75 | 67 3f 0d 66 61 6c 73 65 |ant.debu|g?.false|
|000000f0| 09 63 6f 6e 73 74 61 6e | 74 09 72 65 63 6f 6d 70 |.constan|t.recomp|
|00000100| 54 65 73 74 3f 0d 5b 54 | 48 45 4e 5d 0d 0d 0d 28 |Test?.[T|HEN]...(|
|00000110| 2a 20 54 68 69 73 20 66 | 69 6c 65 20 64 65 66 69 |* This f|ile defi|
|00000120| 6e 65 73 20 74 68 65 20 | 63 6c 61 73 73 65 73 20 |nes the |classes |
|00000130| 77 65 20 75 73 65 20 74 | 6f 20 64 65 73 63 72 69 |we use t|o descri|
|00000140| 62 65 20 74 68 65 20 50 | 50 43 20 72 65 67 69 73 |be the P|PC regis|
|00000150| 74 65 72 73 2c 0d 20 20 | 20 61 6e 64 20 63 72 65 |ters,. | and cre|
|00000160| 61 74 65 73 20 74 68 65 | 20 72 65 67 69 73 74 65 |ates the| registe|
|00000170| 72 20 6f 62 6a 65 63 74 | 73 2e 0d 2a 29 0d 0d 33 |r object|s..*)..3|
|00000180| 09 09 63 6f 6e 73 74 61 | 6e 74 09 73 70 69 6c 6c |..consta|nt.spill|
|00000190| 5f 63 6e 74 09 09 5c 20 | 74 68 65 20 6e 75 6d 62 |_cnt..\ |the numb|
|000001a0| 65 72 20 6f 66 20 72 65 | 67 73 20 77 65 20 73 70 |er of re|gs we sp|
|000001b0| 69 6c 6c 20 69 66 20 77 | 65 20 63 61 6e 27 74 0d |ill if w|e can't.|
|000001c0| 09 09 09 09 09 09 09 09 | 09 5c 20 20 6f 74 68 65 |........|.\ othe|
|000001d0| 72 77 69 73 65 20 67 65 | 74 20 61 20 66 72 65 65 |rwise ge|t a free|
|000001e0| 20 6f 6e 65 0d 0d 30 09 | 76 61 6c 75 65 09 23 67 | one..0.|value.#g|
|000001f0| 70 72 73 5f 63 6c 65 61 | 72 65 64 09 09 09 5c 20 |prs_clea|red...\ |
|00000200| 75 73 65 64 20 62 79 20 | 74 68 65 20 73 70 69 6c |used by |the spil|
|00000210| 6c 69 6e 67 20 63 6f 64 | 65 2c 20 74 6f 20 63 6f |ling cod|e, to co|
|00000220| 75 6e 74 0d 09 09 09 09 | 09 09 09 09 09 5c 20 20 |unt.....|.....\ |
|00000230| 74 68 65 20 47 50 52 73 | 20 77 65 20 61 63 74 75 |the GPRs| we actu|
|00000240| 61 6c 6c 79 20 66 72 65 | 65 20 75 70 0d 0d 5c 20 |ally fre|e up..\ |
|00000250| 53 6f 6d 65 20 75 73 65 | 66 75 6c 20 62 6f 69 6c |Some use|ful boil|
|00000260| 65 72 70 6c 61 74 65 20 | 69 6e 73 74 72 75 63 74 |erplate |instruct|
|00000270| 69 6f 6e 73 3a 0d 0d 50 | 50 43 3f 0d 5b 49 46 5d |ions:..P|PC?.[IF]|
|00000280| 09 09 5c 20 49 6e 20 74 | 68 69 73 20 63 61 73 65 |..\ In t|his case|
|00000290| 20 74 68 65 73 65 20 61 | 72 65 20 61 6c 72 65 61 | these a|re alrea|
|000002a0| 64 79 20 64 65 66 69 6e | 65 64 0d 09 09 09 5c 20 |dy defin|ed....\ |
|000002b0| 20 69 6e 20 74 68 65 20 | 36 38 6b 20 69 6d 61 67 | in the |68k imag|
|000002c0| 65 2c 20 61 6e 64 20 77 | 65 20 63 61 6e 27 74 20 |e, and w|e can't |
|000002d0| 69 6e 74 65 72 70 72 65 | 74 20 74 68 65 20 3c 3c |interpre|t the <<|
|000002e0| 20 6f 70 73 2c 0d 09 09 | 09 5c 20 20 73 6f 20 77 | ops,...|.\ so w|
|000002f0| 65 27 6c 6c 20 64 6f 20 | 69 74 20 74 68 69 73 20 |e'll do |it this |
|00000300| 77 61 79 3a 0d 09 09 09 | 0d 09 4c 52 3e 52 30 09 |way:....|..LR>R0.|
|00000310| 09 63 6f 6e 73 74 61 6e | 74 09 4c 52 3e 52 30 09 |.constan|t.LR>R0.|
|00000320| 09 5c 20 6d 66 6c 72 20 | 20 72 30 0d 09 52 30 3e |.\ mflr | r0..R0>|
|00000330| 4c 52 09 09 63 6f 6e 73 | 74 61 6e 74 09 52 30 3e |LR..cons|tant.R0>|
|00000340| 4c 52 09 09 5c 20 6d 74 | 6c 72 20 20 72 30 0d 09 |LR..\ mt|lr r0..|
|00000350| 42 4c 52 09 09 09 63 6f | 6e 73 74 61 6e 74 09 42 |BLR...co|nstant.B|
|00000360| 4c 52 09 09 09 5c 20 75 | 6e 63 6f 6e 64 69 74 69 |LR...\ u|nconditi|
|00000370| 6f 6e 61 6c 20 62 72 61 | 6e 63 68 20 74 6f 20 6c |onal bra|nch to l|
|00000380| 69 6e 6b 20 72 65 67 0d | 0d 5b 45 4c 53 45 5d 0d |ink reg.|.[ELSE].|
|00000390| 0d 09 33 31 20 32 36 20 | 3c 3c 0d 09 38 20 20 31 |..31 26 |<<..8 1|
|000003a0| 36 20 3c 3c 20 6f 72 0d | 09 33 33 39 20 31 20 3c |6 << or.|.339 1 <|
|000003b0| 3c 20 6f 72 09 09 63 6f | 6e 73 74 61 6e 74 09 4c |< or..co|nstant.L|
|000003c0| 52 3e 52 30 09 5c 20 6d | 66 6c 72 20 20 72 30 0d |R>R0.\ m|flr r0.|
|000003d0| 09 0d 09 33 31 20 32 36 | 20 3c 3c 0d 09 38 20 20 |...31 26| <<..8 |
|000003e0| 31 36 20 3c 3c 20 6f 72 | 0d 09 34 36 37 20 31 20 |16 << or|..467 1 |
|000003f0| 3c 3c 20 6f 72 09 09 63 | 6f 6e 73 74 61 6e 74 09 |<< or..c|onstant.|
|00000400| 52 30 3e 4c 52 09 5c 20 | 6d 74 6c 72 20 20 72 30 |R0>LR.\ |mtlr r0|
|00000410| 0d 0d 09 31 39 20 32 36 | 20 3c 3c 0d 20 20 24 20 |...19 26| <<. $ |
|00000420| 31 34 20 32 31 20 3c 3c | 20 20 6f 72 0d 09 31 36 |14 21 <<| or..16|
|00000430| 20 20 31 20 3c 3c 20 20 | 6f 72 09 63 6f 6e 73 74 | 1 << |or.const|
|00000440| 61 6e 74 09 42 4c 52 09 | 09 5c 20 75 6e 63 6f 6e |ant.BLR.|.\ uncon|
|00000450| 64 69 74 69 6f 6e 61 6c | 20 62 72 61 6e 63 68 20 |ditional| branch |
|00000460| 74 6f 20 6c 69 6e 6b 20 | 72 65 67 0d 0d 5b 54 48 |to link |reg..[TH|
|00000470| 45 4e 5d 0d 0d 3a 20 47 | 50 52 3e 43 54 52 20 20 |EN]..: G|PR>CTR |
|00000480| 28 20 72 65 67 23 20 2d | 2d 20 29 20 20 32 31 20 |( reg# -|- ) 21 |
|00000490| 3c 3c 20 20 24 20 37 43 | 30 39 30 33 41 36 20 6f |<< $ 7C|0903A6 o|
|000004a0| 72 20 20 63 6f 64 65 2c | 20 20 3b 0d 3a 20 43 54 |r code,| ;.: CT|
|000004b0| 52 3e 47 50 52 20 20 28 | 20 72 65 67 23 20 2d 2d |R>GPR (| reg# --|
|000004c0| 20 29 20 20 32 31 20 3c | 3c 20 20 24 20 37 43 30 | ) 21 <|< $ 7C0|
|000004d0| 39 30 32 41 36 20 6f 72 | 20 20 63 6f 64 65 2c 20 |902A6 or| code, |
|000004e0| 20 3b 0d 0d 3a 20 6e 6f | 70 2c 20 20 28 20 2d 2d | ;..: no|p, ( --|
|000004f0| 20 29 20 20 24 20 37 43 | 30 30 30 33 37 38 20 20 | ) $ 7C|000378 |
|00000500| 63 6f 64 65 2c 20 20 3b | 09 09 5c 20 6f 72 20 20 |code, ;|..\ or |
|00000510| 72 30 2c 20 72 30 2c 20 | 72 30 0d 0d 0d 66 6f 72 |r0, r0, |r0...for|
|00000520| 77 61 72 64 20 20 53 50 | 49 4c 4c 0d 66 6f 72 77 |ward SP|ILL.forw|
|00000530| 61 72 64 20 20 63 68 65 | 63 6b 5f 66 6f 72 5f 6d |ard che|ck_for_m|
|00000540| 6f 76 65 64 5f 73 74 6f | 72 65 73 0d 0d 0d 3a 63 |oved_sto|res...:c|
|00000550| 6c 61 73 73 20 20 52 45 | 46 45 52 45 4e 43 45 5f |lass RE|FERENCE_|
|00000560| 4c 49 53 54 20 20 73 75 | 70 65 72 7b 20 72 65 66 |LIST su|per{ ref|
|00000570| 65 72 65 6e 63 65 20 6f | 62 6a 5f 61 72 72 61 79 |erence o|bj_array|
|00000580| 20 7d 0d 0d 09 69 6e 74 | 09 53 49 5a 45 0d 09 0d | }...int|.SIZE...|
|00000590| 3a 6d 20 53 49 5a 45 3a | 09 69 6e 6c 69 6e 65 7b |:m SIZE:|.inline{|
|000005a0| 20 67 65 74 3a 20 73 69 | 7a 65 7d 09 67 65 74 3a | get: si|ze}.get:|
|000005b0| 20 73 69 7a 65 20 20 3b | 6d 0d 3a 6d 20 3e 53 69 | size ;|m.:m >Si|
|000005c0| 5a 45 3a 09 69 6e 6c 69 | 6e 65 7b 20 70 75 74 3a |ZE:.inli|ne{ put:|
|000005d0| 20 73 69 7a 65 7d 09 70 | 75 74 3a 20 73 69 7a 65 | size}.p|ut: size|
|000005e0| 20 20 3b 6d 0d 3a 6d 20 | 2b 53 49 5a 45 3a 09 69 | ;m.:m |+SIZE:.i|
|000005f0| 6e 6c 69 6e 65 7b 20 2b | 3a 20 73 69 7a 65 7d 09 |nline{ +|: size}.|
|00000600| 2b 3a 20 73 69 7a 65 20 | 20 20 20 3b 6d 0d 0d 3a |+: size | ;m..:|
|00000610| 6d 20 53 54 4b 3a 20 20 | 7b 20 6e 20 5c 20 69 6e |m STK: |{ n \ in|
|00000620| 64 65 78 20 2d 2d 20 7d | 0d 09 09 09 5c 20 55 73 |dex -- }|....\ Us|
|00000630| 69 6e 67 20 73 65 6c 66 | 20 61 73 20 61 20 73 74 |ing self| as a st|
|00000640| 61 63 6b 2c 20 73 65 6c | 65 63 74 73 20 74 68 65 |ack, sel|ects the|
|00000650| 20 6e 27 74 68 0d 09 09 | 09 5c 20 20 63 65 6c 6c | n'th...|.\ cell|
|00000660| 2e 20 20 57 65 20 64 6f | 6e 27 74 20 72 65 70 6f |. We do|n't repo|
|00000670| 72 74 20 61 6e 20 65 72 | 72 6f 72 20 69 66 20 6e |rt an er|ror if n|
|00000680| 20 69 73 20 67 72 65 61 | 74 65 72 20 74 68 61 6e | is grea|ter than|
|00000690| 20 74 68 65 0d 09 09 09 | 5c 20 20 63 75 72 72 65 | the....|\ curre|
|000006a0| 6e 74 20 64 65 70 74 68 | 2c 20 73 69 6e 63 65 20 |nt depth|, since |
|000006b0| 74 68 65 72 65 20 61 72 | 65 20 73 69 74 75 61 74 |there ar|e situat|
|000006c0| 69 6f 6e 73 20 69 6e 20 | 65 71 75 61 6c 69 7a 69 |ions in |equalizi|
|000006d0| 6e 67 20 6f 76 65 72 0d | 09 09 09 5c 20 20 62 61 |ng over.|...\ ba|
|000006e0| 73 69 63 20 62 6c 6f 63 | 6b 73 20 77 68 65 72 65 |sic bloc|ks where|
|000006f0| 20 69 74 20 77 6f 75 6c | 64 20 62 65 20 61 20 62 | it woul|d be a b|
|00000700| 69 67 20 70 65 73 74 20 | 74 6f 20 63 68 65 63 6b |ig pest |to check|
|00000710| 20 61 6c 6c 20 74 68 65 | 20 74 69 6d 65 2e 0d 09 | all the| time...|
|00000720| 09 09 5c 20 20 57 65 20 | 6a 75 73 74 20 6d 61 6b |..\ We |just mak|
|00000730| 65 20 73 75 72 65 20 73 | 75 63 68 20 6f 75 74 2d |e sure s|uch out-|
|00000740| 6f 66 2d 72 61 6e 67 65 | 20 63 65 6c 6c 73 20 72 |of-range| cells r|
|00000750| 65 74 75 72 6e 20 22 6e | 6f 52 65 66 22 20 74 79 |eturn "n|oRef" ty|
|00000760| 70 65 2e 0d 0d 09 41 53 | 53 45 52 54 7b 20 6e 20 |pe....AS|SERT{ n |
|00000770| 30 3e 20 7d 09 09 5c 20 | 65 72 72 6f 72 20 69 66 |0> }..\ |error if|
|00000780| 20 73 74 6b 3a 20 63 61 | 6c 6c 65 64 20 77 69 74 | stk: ca|lled wit|
|00000790| 68 20 61 20 6e 65 67 20 | 6f 72 20 7a 65 72 6f 20 |h a neg |or zero |
|000007a0| 69 6e 64 65 78 0d 09 67 | 65 74 3a 20 73 69 7a 65 |index..g|et: size|
|000007b0| 20 20 6e 20 2d 20 20 2d | 3e 20 69 6e 64 65 78 0d | n - -|> index.|
|000007c0| 09 69 6e 64 65 78 20 30 | 3c 0d 09 49 46 09 6c 69 |.index 0|<..IF.li|
|000007d0| 6d 69 74 20 31 2d 20 73 | 65 6c 65 63 74 3a 20 73 |mit 1- s|elect: s|
|000007e0| 65 6c 66 0d 09 09 6e 6f | 52 65 66 20 3e 72 65 66 |elf...no|Ref >ref|
|000007f0| 54 79 70 65 3a 20 73 65 | 6c 66 0d 09 45 4c 53 45 |Type: se|lf..ELSE|
|00000800| 0d 09 09 69 6e 64 65 78 | 20 20 73 65 6c 65 63 74 |...index| select|
|00000810| 3a 20 73 65 6c 66 0d 09 | 54 48 45 4e 0d 3b 6d 0d |: self..|THEN.;m.|
|00000820| 0d 3a 6d 20 50 55 53 48 | 3a 09 5c 20 28 20 5e 72 |.:m PUSH|:.\ ( ^r|
|00000830| 65 66 20 2d 2d 20 29 0d | 09 67 65 74 3a 20 73 69 |ef -- ).|.get: si|
|00000840| 7a 65 20 20 73 65 6c 65 | 63 74 3a 20 73 65 6c 66 |ze sele|ct: self|
|00000850| 0d 09 2d 3e 3a 20 73 65 | 6c 66 0d 09 31 20 2b 3a |..->: se|lf..1 +:|
|00000860| 20 73 69 7a 65 0d 3b 6d | 0d 0d 3a 6d 20 4d 4f 56 | size.;m|..:m MOV|
|00000870| 45 44 4f 57 4e 3a 09 09 | 5c 20 6d 6f 76 65 73 20 |EDOWN:..|\ moves |
|00000880| 61 6c 6c 20 69 74 65 6d | 73 20 22 64 6f 77 6e 22 |all item|s "down"|
|00000890| 20 74 6f 20 6d 61 6b 65 | 20 72 6f 6f 6d 20 66 6f | to make| room fo|
|000008a0| 72 20 61 6e 6f 74 68 65 | 72 2e 0d 09 09 09 09 09 |r anothe|r.......|
|000008b0| 5c 20 20 4c 65 61 76 65 | 73 20 65 6c 65 6d 65 6e |\ Leave|s elemen|
|000008c0| 74 20 7a 65 72 6f 20 73 | 65 6c 65 63 74 65 64 2e |t zero s|elected.|
|000008d0| 0d 09 67 65 74 3a 20 73 | 69 7a 65 0d 09 49 46 09 |..get: s|ize..IF.|
|000008e0| 67 65 74 3a 20 73 69 7a | 65 0d 09 09 46 4f 52 09 |get: siz|e...FOR.|
|000008f0| 69 20 5e 65 6c 65 6d 0d | 09 09 09 69 20 31 2b 20 |i ^elem.|...i 1+ |
|00000900| 73 65 6c 65 63 74 3a 20 | 73 65 6c 66 0d 09 09 09 |select: |self....|
|00000910| 2d 3e 3a 20 73 65 6c 66 | 0d 09 09 4e 45 58 54 0d |->: self|...NEXT.|
|00000920| 09 54 48 45 4e 0d 09 31 | 20 2b 3a 20 73 69 7a 65 |.THEN..1| +: size|
|00000930| 0d 09 30 20 73 65 6c 65 | 63 74 3a 20 73 65 6c 66 |..0 sele|ct: self|
|00000940| 0d 3b 6d 0d 0d 3a 6d 20 | 4d 4f 56 45 55 50 3a 0d |.;m..:m |MOVEUP:.|
|00000950| 09 67 65 74 3a 20 73 69 | 7a 65 20 20 4e 49 46 20 |.get: si|ze NIF |
|00000960| 2e 22 20 6d 6f 76 65 75 | 70 3a 20 66 69 6e 64 73 |." moveu|p: finds|
|00000970| 20 7a 65 72 6f 20 73 69 | 7a 65 22 20 63 72 0d 09 | zero si|ze" cr..|
|00000980| 09 09 09 09 70 72 69 6e | 74 61 6c 6c 3a 20 73 65 |....prin|tall: se|
|00000990| 6c 66 20 20 28 20 31 20 | 64 69 65 20 29 0d 09 09 |lf ( 1 |die )...|
|000009a0| 09 20 20 20 54 48 45 4e | 0d 0d 09 30 20 73 65 6c |. THEN|...0 sel|
|000009b0| 65 63 74 3a 20 73 65 6c | 66 20 20 66 72 65 65 3a |ect: sel|f free:|
|000009c0| 20 73 65 6c 66 09 09 5c | 20 6e 6f 74 65 20 2d 20 | self..\| note - |
|000009d0| 72 65 67 20 69 73 20 6e | 6f 77 20 73 65 6c 65 63 |reg is n|ow selec|
|000009e0| 74 65 64 0d 09 0d 09 67 | 65 74 3a 20 72 65 66 54 |ted....g|et: refT|
|000009f0| 79 70 65 0d 09 53 45 4c | 45 43 54 5b 20 67 70 72 |ype..SEL|ECT[ gpr|
|00000a00| 52 65 66 20 5d 3d 3e 09 | 3f 63 6c 65 61 72 5f 47 |Ref ]=>.|?clear_G|
|00000a10| 50 52 0d 09 09 20 20 5b | 20 63 72 52 65 66 20 20 |PR... [| crRef |
|00000a20| 5d 3d 3e 09 3f 63 6c 65 | 61 72 5f 43 52 0d 0d 09 |]=>.?cle|ar_CR...|
|00000a30| 09 44 45 46 41 55 4c 54 | 3d 3e 09 09 64 72 6f 70 |.DEFAULT|=>..drop|
|00000a40| 09 5c 20 6e 6f 74 20 61 | 6e 20 65 72 72 6f 72 20 |.\ not a|n error |
|00000a50| 2d 20 6a 75 73 74 20 6e | 6f 74 68 69 6e 67 20 74 |- just n|othing t|
|00000a60| 6f 20 64 6f 0d 09 5d 53 | 45 4c 45 43 54 0d 0d 09 |o do..]S|ELECT...|
|00000a70| 31 20 2d 3a 20 73 69 7a | 65 0d 09 67 65 74 3a 20 |1 -: siz|e..get: |
|00000a80| 73 69 7a 65 20 20 30 0d | 09 3f 44 4f 09 69 20 31 |size 0.|.?DO.i 1|
|00000a90| 2b 20 5e 65 6c 65 6d 0d | 09 09 69 20 73 65 6c 65 |+ ^elem.|..i sele|
|00000aa0| 63 74 3a 20 73 65 6c 66 | 0d 09 09 2d 3e 3a 20 73 |ct: self|...->: s|
|00000ab0| 65 6c 66 0d 09 4c 4f 4f | 50 0d 3b 6d 0d 0d 3a 6d |elf..LOO|P.;m..:m|
|00000ac0| 20 53 41 56 45 3a 0d 09 | 67 65 74 3a 20 73 69 7a | SAVE:..|get: siz|
|00000ad0| 65 20 20 30 20 0d 09 3f | 44 4f 20 20 69 20 73 65 |e 0 ..?|DO i se|
|00000ae0| 6c 65 63 74 3a 20 73 65 | 6c 66 20 20 73 74 61 63 |lect: se|lf stac|
|00000af0| 6b 3a 20 73 65 6c 66 20 | 20 4c 4f 4f 50 0d 09 67 |k: self | LOOP..g|
|00000b00| 65 74 3a 20 73 69 7a 65 | 0d 3b 6d 0d 0d 3a 6d 20 |et: size|.;m..:m |
|00000b10| 52 45 53 54 4f 52 45 3a | 0d 09 64 75 70 20 20 70 |RESTORE:|..dup p|
|00000b20| 75 74 3a 20 73 69 7a 65 | 20 20 3f 64 75 70 20 30 |ut: size| ?dup 0|
|00000b30| 45 58 49 54 0d 09 46 4f | 52 20 20 69 20 73 65 6c |EXIT..FO|R i sel|
|00000b40| 65 63 74 3a 20 73 65 6c | 66 20 20 75 6e 73 74 61 |ect: sel|f unsta|
|00000b50| 63 6b 3a 20 73 65 6c 66 | 20 20 4e 45 58 54 0d 3b |ck: self| NEXT.;|
|00000b60| 6d 0d 0d 3a 6d 20 50 52 | 49 4e 54 41 4c 4c 3a 0d |m..:m PR|INTALL:.|
|00000b70| 09 2e 22 20 64 65 70 74 | 68 3a 20 22 20 20 67 65 |.." dept|h: " ge|
|00000b80| 74 3a 20 73 69 7a 65 20 | 2e 20 20 63 72 0d 09 67 |t: size |. cr..g|
|00000b90| 65 74 3a 20 73 69 7a 65 | 20 30 3c 0d 09 49 46 09 |et: size| 0<..IF.|
|00000ba0| 63 6c 65 61 72 3a 20 73 | 69 7a 65 20 20 45 58 49 |clear: s|ize EXI|
|00000bb0| 54 20 20 54 48 45 4e 0d | 09 67 65 74 3a 20 73 69 |T THEN.|.get: si|
|00000bc0| 7a 65 20 20 30 45 58 49 | 54 0d 09 67 65 74 3a 20 |ze 0EXI|T..get: |
|00000bd0| 63 75 72 72 65 6e 74 0d | 09 67 65 74 3a 20 73 69 |current.|.get: si|
|00000be0| 7a 65 0d 09 46 4f 52 20 | 20 3f 70 61 75 73 65 20 |ze..FOR | ?pause |
|00000bf0| 20 69 20 73 65 6c 65 63 | 74 3a 20 73 65 6c 66 20 | i selec|t: self |
|00000c00| 20 70 72 69 6e 74 3a 20 | 73 65 6c 66 20 20 4e 45 | print: |self NE|
|00000c10| 58 54 0d 09 73 65 6c 65 | 63 74 3a 20 73 65 6c 66 |XT..sele|ct: self|
|00000c20| 0d 3b 6d 0d 0d 3b 63 6c | 61 73 73 0d 0d 0d 32 34 |.;m..;cl|ass...24|
|00000c30| 09 72 65 66 65 72 65 6e | 63 65 5f 6c 69 73 74 09 |.referen|ce_list.|
|00000c40| 43 53 54 4b 09 09 5c 20 | 43 6f 6d 70 69 6c 65 20 |CSTK..\ |Compile |
|00000c50| 74 69 6d 65 20 73 74 61 | 63 6b 20 2d 20 6d 61 70 |time sta|ck - map|
|00000c60| 73 20 74 68 65 20 72 75 | 6e 2d 74 69 6d 65 0d 09 |s the ru|n-time..|
|00000c70| 09 09 09 09 09 09 09 5c | 20 64 61 74 61 20 73 74 |.......\| data st|
|00000c80| 61 63 6b 20 74 6f 20 72 | 65 67 73 0d 0d 32 34 09 |ack to r|egs..24.|
|00000c90| 72 65 66 65 72 65 6e 63 | 65 5f 6c 69 73 74 09 43 |referenc|e_list.C|
|00000ca0| 53 54 4b 32 09 09 5c 20 | 55 73 65 64 20 69 6e 20 |STK2..\ |Used in |
|00000cb0| 65 71 75 61 6c 69 7a 69 | 6e 67 20 62 65 74 77 65 |equalizi|ng betwe|
|00000cc0| 65 6e 20 62 61 73 69 63 | 20 62 6c 6f 63 6b 73 0d |en basic| blocks.|
|00000cd0| 32 34 09 72 65 66 65 72 | 65 6e 63 65 5f 6c 69 73 |24.refer|ence_lis|
|00000ce0| 74 09 43 53 54 4b 32 5f | 4f 52 49 47 09 5c 20 44 |t.CSTK2_|ORIG.\ D|
|00000cf0| 69 74 74 6f 0d 0d 32 34 | 09 72 65 66 65 72 65 6e |itto..24|.referen|
|00000d00| 63 65 5f 6c 69 73 74 09 | 43 53 54 4b 5f 54 45 4d |ce_list.|CSTK_TEM|
|00000d10| 50 09 5c 20 46 6f 72 20 | 73 63 72 61 74 63 68 20 |P.\ For |scratch |
|00000d20| 77 68 69 6c 65 20 65 71 | 75 61 6c 69 7a 69 6e 67 |while eq|ualizing|
|00000d30| 0d 0d 32 34 09 72 65 66 | 65 72 65 6e 63 65 5f 6c |..24.ref|erence_l|
|00000d40| 69 73 74 09 46 43 53 54 | 4b 09 09 5c 20 46 6c 6f |ist.FCST|K..\ Flo|
|00000d50| 61 74 69 6e 67 20 63 6f | 6d 70 69 6c 65 20 74 69 |ating co|mpile ti|
|00000d60| 6d 65 20 73 74 61 63 6b | 0d 0d 32 34 09 72 65 66 |me stack|..24.ref|
|00000d70| 65 72 65 6e 63 65 5f 6c | 69 73 74 09 46 43 53 54 |erence_l|ist.FCST|
|00000d80| 4b 32 0d 32 34 09 72 65 | 66 65 72 65 6e 63 65 5f |K2.24.re|ference_|
|00000d90| 6c 69 73 74 09 46 43 53 | 54 4b 32 5f 4f 52 49 47 |list.FCS|TK2_ORIG|
|00000da0| 0d 0d 32 34 09 72 65 66 | 65 72 65 6e 63 65 5f 6c |..24.ref|erence_l|
|00000db0| 69 73 74 09 46 43 53 54 | 4b 5f 54 45 4d 50 0d 0d |ist.FCST|K_TEMP..|
|00000dc0| 0d 6f 62 6a 50 74 72 09 | 61 52 65 66 09 63 6c 61 |.objPtr.|aRef.cla|
|00000dd0| 73 73 5f 69 73 20 72 65 | 66 65 72 65 6e 63 65 0d |ss_is re|ference.|
|00000de0| 6f 62 6a 50 74 72 09 61 | 52 65 66 32 09 63 6c 61 |objPtr.a|Ref2.cla|
|00000df0| 73 73 5f 69 73 20 72 65 | 66 65 72 65 6e 63 65 0d |ss_is re|ference.|
|00000e00| 0d 6f 62 6a 50 74 72 09 | 61 52 65 66 4c 09 63 6c |.objPtr.|aRefL.cl|
|00000e10| 61 73 73 5f 69 73 20 72 | 65 66 65 72 65 6e 63 65 |ass_is r|eference|
|00000e20| 5f 6c 69 73 74 0d 0d 0d | 0d 0d 28 2a 09 4f 44 73 |_list...|..(*.ODs|
|00000e30| 5f 43 4c 41 53 53 20 69 | 73 20 61 6e 20 61 72 72 |_CLASS i|s an arr|
|00000e40| 61 79 20 6f 66 20 4f 44 | 20 6f 62 6a 65 63 74 73 |ay of OD| objects|
|00000e50| 2c 20 64 65 66 69 6e 65 | 64 20 75 73 69 6e 67 20 |, define|d using |
|00000e60| 6f 62 6a 5f 61 72 72 61 | 79 2e 0d 09 57 65 27 6c |obj_arra|y...We'l|
|00000e70| 6c 20 75 73 65 20 74 68 | 69 73 20 63 6c 61 73 73 |l use th|is class|
|00000e80| 20 66 6f 72 20 6f 75 72 | 20 33 20 72 65 67 69 73 | for our| 3 regis|
|00000e90| 74 65 72 20 66 69 6c 65 | 73 20 2d 20 47 50 52 73 |ter file|s - GPRs|
|00000ea0| 2c 20 46 50 52 73 20 61 | 6e 64 20 43 52 73 2e 0d |, FPRs a|nd CRs..|
|00000eb0| 2a 29 0d 0d 0d 3a 63 6c | 61 73 73 09 4f 44 73 5f |*)...:cl|ass.ODs_|
|00000ec0| 43 4c 41 53 53 20 20 73 | 75 70 65 72 7b 20 4f 44 |CLASS s|uper{ OD|
|00000ed0| 20 6c 61 72 67 65 5f 6f | 62 6a 5f 61 72 72 61 79 | large_o|bj_array|
|00000ee0| 20 7d 0d 0d 6f 62 6a 50 | 74 72 09 73 70 69 6c 6c | }..objP|tr.spill|
|00000ef0| 4f 44 73 20 20 63 6c 61 | 73 73 5f 69 73 20 4f 44 |ODs cla|ss_is OD|
|00000f00| 73 5f 63 6c 61 73 73 0d | 0d 09 69 6e 74 09 09 6c |s_class.|..int..l|
|00000f10| 61 73 74 5f 61 6c 6c 6f | 63 61 74 65 64 0d 09 69 |ast_allo|cated..i|
|00000f20| 6e 74 09 09 61 6c 6c 6f | 63 5f 6c 69 6d 69 74 09 |nt..allo|c_limit.|
|00000f30| 09 09 5c 20 6c 61 73 74 | 20 72 65 67 23 20 77 65 |..\ last| reg# we|
|00000f40| 20 63 61 6e 20 61 6c 6c | 6f 63 61 74 65 0d 09 69 | can all|ocate..i|
|00000f50| 6e 74 09 09 31 73 74 5f | 6e 6f 6e 76 6f 6c 61 74 |nt..1st_|nonvolat|
|00000f60| 69 6c 65 0d 0d 0d 3a 6d | 20 4c 41 53 54 5f 41 4c |ile...:m| LAST_AL|
|00000f70| 4c 4f 43 41 54 45 44 3a | 09 09 67 65 74 3a 20 6c |LOCATED:|..get: l|
|00000f80| 61 73 74 5f 61 6c 6c 6f | 63 61 74 65 64 20 20 3b |ast_allo|cated ;|
|00000f90| 6d 0d 3a 6d 20 3e 4c 41 | 53 54 5f 41 4c 4c 4f 43 |m.:m >LA|ST_ALLOC|
|00000fa0| 41 54 45 44 3a 09 09 70 | 75 74 3a 20 6c 61 73 74 |ATED:..p|ut: last|
|00000fb0| 5f 61 6c 6c 6f 63 61 74 | 65 64 20 20 3b 6d 0d 0d |_allocat|ed ;m..|
|00000fc0| 3a 6d 20 3e 41 4c 4c 4f | 43 5f 4c 49 4d 49 54 3a |:m >ALLO|C_LIMIT:|
|00000fd0| 09 09 70 75 74 3a 20 61 | 6c 6c 6f 63 5f 6c 69 6d |..put: a|lloc_lim|
|00000fe0| 69 74 09 3b 6d 0d 0d 70 | 72 69 76 61 74 65 0d 0d |it.;m..p|rivate..|
|00000ff0| 28 2a 20 57 65 20 63 61 | 6c 6c 20 69 73 5f 72 65 |(* We ca|ll is_re|
|00001000| 67 5f 75 6e 75 73 65 64 | 3f 3a 20 69 6e 20 74 68 |g_unused|?: in th|
|00001010| 65 20 66 69 72 73 74 20 | 6c 6f 6f 70 20 77 68 69 |e first |loop whi|
|00001020| 6c 65 20 74 72 79 69 6e | 67 20 74 6f 20 66 69 6e |le tryin|g to fin|
|00001030| 64 20 61 20 66 72 65 65 | 0d 20 20 20 72 65 67 2e |d a free|. reg.|
|00001040| 20 20 41 6e 20 22 75 6e | 75 73 65 64 22 20 72 65 | An "un|used" re|
|00001050| 67 20 69 73 20 70 72 65 | 66 65 72 61 62 6c 65 20 |g is pre|ferable |
|00001060| 74 6f 20 6f 6e 65 20 77 | 69 74 68 20 61 20 7a 65 |to one w|ith a ze|
|00001070| 72 6f 20 72 65 66 43 6e | 74 2c 20 73 69 6e 63 65 |ro refCn|t, since|
|00001080| 0d 20 20 20 74 68 65 20 | 6c 61 74 74 65 72 20 63 |. the |latter c|
|00001090| 6f 75 6c 64 20 73 74 69 | 6c 6c 20 68 6f 6c 64 20 |ould sti|ll hold |
|000010a0| 61 20 76 61 6c 69 64 20 | 76 61 6c 75 65 20 74 68 |a valid |value th|
|000010b0| 61 74 20 63 6f 75 6c 64 | 20 62 65 20 72 65 75 73 |at could| be reus|
|000010c0| 65 64 20 69 6e 0d 20 20 | 20 66 75 74 75 72 65 2c |ed in. | future,|
|000010d0| 20 6f 72 20 6d 61 79 20 | 68 61 76 65 20 6a 75 73 | or may |have jus|
|000010e0| 74 20 72 65 63 65 6e 74 | 6c 79 20 62 65 65 6e 20 |t recent|ly been |
|000010f0| 75 73 65 64 20 61 6e 64 | 20 73 6f 20 6e 6f 74 20 |used and| so not |
|00001100| 62 65 20 61 76 61 6c 69 | 61 62 6c 65 0d 20 20 20 |be avali|able. |
|00001110| 66 6f 72 20 72 65 74 61 | 72 67 65 74 74 69 6e 67 |for reta|rgetting|
|00001120| 20 61 6e 20 65 61 72 6c | 69 65 72 20 6f 70 2e 0d | an earl|ier op..|
|00001130| 20 20 20 46 61 63 74 6f | 72 69 6e 67 20 6f 75 74 | Facto|ring out|
|00001140| 20 74 68 69 73 20 6d 65 | 74 68 6f 64 20 61 6c 6c | this me|thod all|
|00001150| 6f 77 73 20 75 73 20 74 | 6f 20 74 69 6e 6b 65 72 |ows us t|o tinker|
|00001160| 20 77 69 74 68 20 69 74 | 20 61 20 62 69 74 2e 0d | with it| a bit..|
|00001170| 2a 29 0d 0d 3a 6d 20 69 | 73 5f 72 65 67 5f 75 6e |*)..:m i|s_reg_un|
|00001180| 75 73 65 64 3f 3a 20 20 | 28 20 2d 2d 20 62 20 29 |used?: |( -- b )|
|00001190| 0d 0d 09 28 2a 20 46 69 | 72 73 74 20 77 65 20 63 |...(* Fi|rst we c|
|000011a0| 61 6e 20 6f 6e 6c 79 20 | 67 72 61 62 20 61 20 72 |an only |grab a r|
|000011b0| 65 67 20 69 66 20 69 74 | 73 20 72 65 66 43 6e 74 |eg if it|s refCnt|
|000011c0| 20 69 73 20 7a 65 72 6f | 2e 20 20 49 66 20 69 74 | is zero|. If it|
|000011d0| 27 73 0d 09 20 20 20 6e | 6f 6e 7a 65 72 6f 2c 20 |'s.. n|onzero, |
|000011e0| 74 68 65 20 72 65 67 20 | 69 73 20 6c 69 76 65 2c |the reg |is live,|
|000011f0| 20 73 6f 20 77 65 20 63 | 61 6e 27 74 20 75 73 65 | so we c|an't use|
|00001200| 20 69 74 20 6e 6f 20 6d | 61 74 74 65 72 20 77 68 | it no m|atter wh|
|00001210| 61 74 2e 0d 09 20 20 20 | 28 54 68 69 73 20 61 6c |at... |(This al|
|00001220| 73 6f 20 61 6c 6c 6f 77 | 73 20 75 73 20 74 6f 20 |so allow|s us to |
|00001230| 62 6c 6f 63 6b 20 61 20 | 70 61 72 74 69 63 75 6c |block a |particul|
|00001240| 61 72 20 72 65 67 20 62 | 65 69 6e 67 20 61 6c 6c |ar reg b|eing all|
|00001250| 6f 63 61 74 65 64 2c 0d | 09 20 20 20 65 76 65 6e |ocated,.|. even|
|00001260| 20 69 66 20 69 74 27 73 | 20 65 6d 70 74 79 2c 20 | if it's| empty, |
|00001270| 62 79 20 73 65 74 74 69 | 6e 67 20 69 74 73 20 72 |by setti|ng its r|
|00001280| 65 66 63 6e 74 20 6e 6f | 6e 7a 65 72 6f 2e 20 20 |efcnt no|nzero. |
|00001290| 57 65 20 6e 65 65 64 20 | 74 6f 0d 09 20 20 20 64 |We need |to.. d|
|000012a0| 6f 20 74 68 69 73 20 66 | 6f 72 20 43 52 30 20 69 |o this f|or CR0 i|
|000012b0| 6e 20 70 61 72 74 69 63 | 75 6c 61 72 2e 0d 09 2a |n partic|ular...*|
|000012c0| 29 0d 09 67 65 74 3a 20 | 72 65 66 43 6e 74 20 49 |)..get: |refCnt I|
|000012d0| 46 20 20 66 61 6c 73 65 | 20 20 45 58 49 54 20 20 |F false| EXIT |
|000012e0| 54 48 45 4e 0d 09 0d 09 | 28 2a 20 4e 6f 77 20 77 |THEN....|(* Now w|
|000012f0| 65 20 6c 6f 6f 6b 20 66 | 6f 72 20 61 20 63 6f 6d |e look f|or a com|
|00001300| 70 6c 65 74 65 6c 79 20 | 75 6e 75 73 65 64 20 72 |pletely |unused r|
|00001310| 65 67 2c 20 6f 72 20 6f | 6e 65 20 77 69 74 68 20 |eg, or o|ne with |
|00001320| 74 79 70 65 0d 09 20 20 | 20 6f 74 55 6e 6b 6e 6f |type.. | otUnkno|
|00001330| 77 6e 20 61 6e 64 20 6c | 61 73 74 52 65 66 43 44 |wn and l|astRefCD|
|00001340| 50 20 61 74 20 6f 72 20 | 62 65 66 6f 72 65 20 74 |P at or |before t|
|00001350| 68 65 20 63 75 72 72 65 | 6e 74 20 62 61 73 69 63 |he curre|nt basic|
|00001360| 20 62 6c 6f 63 6b 0d 09 | 20 20 20 73 74 61 72 74 | block..| start|
|00001370| 2e 20 20 54 68 61 74 27 | 73 20 6a 75 73 74 20 61 |. That'|s just a|
|00001380| 73 20 67 6f 6f 64 2c 20 | 61 73 20 69 74 20 63 6f |s good, |as it co|
|00001390| 75 6c 64 20 6e 65 76 65 | 72 20 62 65 20 72 65 75 |uld neve|r be reu|
|000013a0| 73 65 64 2c 20 61 6e 64 | 0d 09 20 20 20 63 6f 75 |sed, and|.. cou|
|000013b0| 6c 64 20 6e 65 76 65 72 | 20 62 6c 6f 63 6b 20 61 |ld never| block a|
|000013c0| 20 72 65 74 61 72 67 65 | 74 74 69 6e 67 2e 0d 09 | retarge|tting...|
|000013d0| 2a 29 0d 09 67 65 74 3a | 20 6f 70 54 79 70 65 20 |*)..get:| opType |
|000013e0| 20 4e 49 46 20 20 74 72 | 75 65 20 20 45 58 49 54 | NIF tr|ue EXIT|
|000013f0| 20 20 54 48 45 4e 0d 09 | 67 65 74 3a 20 6f 70 54 | THEN..|get: opT|
|00001400| 79 70 65 20 20 6f 74 55 | 6e 6b 6e 6f 77 6e 43 6f |ype otU|nknownCo|
|00001410| 64 65 73 20 3e 20 20 49 | 46 20 20 66 61 6c 73 65 |des > I|F false|
|00001420| 20 20 45 58 49 54 20 20 | 54 48 45 4e 0d 0d 09 67 | EXIT |THEN...g|
|00001430| 65 74 3a 20 6c 61 73 74 | 52 65 66 43 44 50 20 20 |et: last|RefCDP |
|00001440| 62 61 73 69 63 5f 62 6c | 6f 63 6b 5f 73 74 61 72 |basic_bl|ock_star|
|00001450| 74 20 75 3c 3d 0d 09 49 | 46 0d 09 09 67 65 74 3a |t u<=..I|F...get:|
|00001460| 20 6f 70 43 44 50 20 20 | 62 61 73 69 63 5f 62 6c | opCDP |basic_bl|
|00001470| 6f 63 6b 5f 73 74 61 72 | 74 20 75 3e 0d 09 09 49 |ock_star|t u>...I|
|00001480| 46 0d 09 09 09 67 65 74 | 3a 20 6f 70 43 44 50 20 |F....get|: opCDP |
|00001490| 20 70 75 74 3a 20 6c 61 | 73 74 52 65 66 43 44 50 | put: la|stRefCDP|
|000014a0| 0d 09 09 54 48 45 4e 0d | 09 09 74 72 75 65 20 20 |...THEN.|..true |
|000014b0| 45 58 49 54 0d 09 54 48 | 45 4e 0d 09 66 61 6c 73 |EXIT..TH|EN..fals|
|000014c0| 65 0d 3b 6d 0d 0d 70 75 | 62 6c 69 63 0d 0d 28 2a |e.;m..pu|blic..(*|
|000014d0| 09 47 65 74 46 72 65 65 | 52 65 67 3a 20 64 6f 65 |.GetFree|Reg: doe|
|000014e0| 73 20 6a 75 73 74 20 74 | 68 61 74 2e 20 20 57 65 |s just t|hat. We|
|000014f0| 20 66 69 72 73 74 20 74 | 72 79 20 74 6f 20 66 69 | first t|ry to fi|
|00001500| 6e 64 20 61 20 63 6f 6d | 70 6c 65 74 65 6c 79 20 |nd a com|pletely |
|00001510| 75 6e 75 73 65 64 0d 09 | 72 65 67 2e 20 20 49 66 |unused..|reg. If|
|00001520| 20 74 68 61 74 20 66 61 | 69 6c 73 2c 20 77 65 20 | that fa|ils, we |
|00001530| 63 61 6e 20 64 6f 20 6f | 6e 65 20 6f 66 20 74 77 |can do o|ne of tw|
|00001540| 6f 20 74 68 69 6e 67 73 | 20 2d 20 77 65 20 63 61 |o things| - we ca|
|00001550| 6e 20 67 72 61 62 20 61 | 20 72 65 67 0d 09 77 68 |n grab a| reg..wh|
|00001560| 69 63 68 20 69 73 20 69 | 6e 61 63 74 69 76 65 20 |ich is i|nactive |
|00001570| 28 7a 65 72 6f 20 72 65 | 66 63 6e 74 29 20 62 75 |(zero re|fcnt) bu|
|00001580| 74 20 77 69 74 68 20 61 | 20 76 61 6c 69 64 20 76 |t with a| valid v|
|00001590| 61 6c 75 65 2c 20 6f 72 | 20 77 65 0d 09 63 61 6e |alue, or| we..can|
|000015a0| 20 73 70 69 6c 6c 20 73 | 6f 6d 65 20 6f 66 20 74 | spill s|ome of t|
|000015b0| 68 65 20 73 74 61 63 6b | 20 74 6f 20 6d 65 6d 6f |he stack| to memo|
|000015c0| 72 79 20 77 68 69 63 68 | 20 77 69 6c 6c 20 66 72 |ry which| will fr|
|000015d0| 65 65 20 61 63 74 69 76 | 65 0d 09 72 65 67 73 2e |ee activ|e..regs.|
|000015e0| 20 20 57 65 20 75 73 65 | 64 20 74 6f 20 74 72 79 | We use|d to try|
|000015f0| 20 74 6f 20 6b 65 65 70 | 20 61 74 20 6c 65 61 73 | to keep| at leas|
|00001600| 74 20 33 20 72 65 63 65 | 6e 74 6c 79 20 63 6f 6d |t 3 rece|ntly com|
|00001610| 70 75 74 65 64 0d 09 76 | 61 6c 75 65 73 2c 20 61 |puted..v|alues, a|
|00001620| 6e 64 20 73 6f 20 73 70 | 69 6c 6c 65 64 20 69 66 |nd so sp|illed if|
|00001630| 20 74 68 65 72 65 20 77 | 65 72 65 20 33 20 6f 72 | there w|ere 3 or|
|00001640| 20 6c 65 73 73 20 69 6e | 61 63 74 69 76 65 20 72 | less in|active r|
|00001650| 65 67 73 2e 0d 09 42 75 | 74 20 74 68 69 73 20 77 |egs...Bu|t this w|
|00001660| 61 73 20 64 69 73 61 73 | 74 72 6f 75 73 20 69 66 |as disas|trous if|
|00001670| 20 77 65 20 77 65 72 65 | 20 64 6f 69 6e 67 20 61 | we were| doing a|
|00001680| 6e 20 65 71 75 61 6c 69 | 7a 61 74 69 6f 6e 2c 20 |n equali|zation, |
|00001690| 61 6e 64 0d 09 61 6e 79 | 77 61 79 20 61 20 73 70 |and..any|way a sp|
|000016a0| 69 6c 6c 20 73 68 6f 75 | 6c 64 20 70 72 6f 62 61 |ill shou|ld proba|
|000016b0| 62 6c 79 20 62 65 20 61 | 20 6c 61 73 74 20 72 65 |bly be a| last re|
|000016c0| 73 6f 72 74 20 74 68 69 | 6e 67 20 61 6e 79 77 61 |sort thi|ng anywa|
|000016d0| 79 2e 0d 09 53 6f 20 6e | 6f 77 20 77 65 20 6f 6e |y...So n|ow we on|
|000016e0| 6c 79 20 73 70 69 6c 6c | 20 69 66 20 77 65 27 72 |ly spill| if we'r|
|000016f0| 65 20 72 69 67 68 74 20 | 6f 75 74 20 6f 66 20 72 |e right |out of r|
|00001700| 65 67 73 2e 0d 09 0d 09 | 4e 6f 74 65 2c 20 74 68 |egs.....|Note, th|
|00001710| 61 74 20 6f 6e 65 20 74 | 68 69 6e 67 20 74 68 61 |at one t|hing tha|
|00001720| 74 27 73 20 74 65 6d 70 | 74 69 6e 67 20 74 6f 20 |t's temp|ting to |
|00001730| 64 6f 20 69 73 20 63 61 | 6c 6c 20 75 70 64 61 74 |do is ca|ll updat|
|00001740| 65 5f 72 65 66 63 6e 74 | 73 0d 09 69 6e 20 63 61 |e_refcnt|s..in ca|
|00001750| 73 65 20 74 68 65 72 65 | 27 73 20 61 20 72 65 67 |se there|'s a reg|
|00001760| 20 74 68 61 74 27 73 20 | 61 70 70 61 72 65 6e 74 | that's |apparent|
|00001770| 6c 79 20 72 65 66 65 72 | 65 6e 63 65 64 20 62 75 |ly refer|enced bu|
|00001780| 74 20 72 65 61 6c 6c 79 | 20 69 73 6e 27 74 2e 0d |t really| isn't..|
|00001790| 09 54 68 69 73 20 63 61 | 6e 20 68 61 70 70 65 6e |.This ca|n happen|
|000017a0| 2e 20 20 42 75 74 20 69 | 74 27 73 20 6e 6f 74 20 |. But i|t's not |
|000017b0| 73 61 66 65 20 74 6f 20 | 63 61 6c 6c 20 75 70 64 |safe to |call upd|
|000017c0| 61 74 65 5f 72 65 66 63 | 6e 74 73 20 68 65 72 65 |ate_refc|nts here|
|000017d0| 2c 20 73 69 6e 63 65 0d | 09 77 65 20 63 61 6e 20 |, since.|.we can |
|000017e0| 62 65 20 69 6e 20 74 68 | 65 20 6d 69 64 64 6c 65 |be in th|e middle|
|000017f0| 20 6f 66 20 64 6f 69 6e | 67 20 6a 75 73 74 20 61 | of doin|g just a|
|00001800| 62 6f 75 74 20 61 6e 79 | 74 68 69 6e 67 20 77 68 |bout any|thing wh|
|00001810| 65 6e 20 77 65 20 6e 65 | 65 64 20 61 0d 09 66 72 |en we ne|ed a..fr|
|00001820| 65 65 20 72 65 67 2e 20 | 20 57 65 20 6d 69 67 68 |ee reg. | We migh|
|00001830| 74 20 68 61 76 65 20 67 | 72 61 62 62 65 64 20 61 |t have g|rabbed a|
|00001840| 6e 20 6f 70 65 72 61 6e | 64 20 6f 72 20 74 77 6f |n operan|d or two|
|00001850| 20 69 6e 74 6f 20 6f 70 | 6e 64 31 2c 20 6f 70 6e | into op|nd1, opn|
|00001860| 64 32 0d 09 6f 72 20 72 | 65 73 31 2c 20 61 6e 64 |d2..or r|es1, and|
|00001870| 20 6e 6f 20 6c 6f 6e 67 | 65 72 20 68 61 76 65 20 | no long|er have |
|00001880| 61 20 72 65 66 65 72 65 | 6e 63 65 20 69 6e 20 63 |a refere|nce in c|
|00001890| 73 74 6b 2c 20 77 68 69 | 63 68 20 77 6f 75 6c 64 |stk, whi|ch would|
|000018a0| 20 6c 65 61 64 0d 09 74 | 6f 20 75 73 20 67 72 61 | lead..t|o us gra|
|000018b0| 62 62 69 6e 67 20 61 20 | 72 65 67 20 74 68 61 74 |bbing a |reg that|
|000018c0| 27 73 20 69 6e 20 75 73 | 65 2e 20 20 57 65 20 6d |'s in us|e. We m|
|000018d0| 75 73 74 20 6f 6e 6c 79 | 20 63 61 6c 6c 20 75 70 |ust only| call up|
|000018e0| 64 61 74 65 5f 72 65 66 | 63 6e 74 73 0d 09 61 74 |date_ref|cnts..at|
|000018f0| 20 70 6c 61 63 65 73 20 | 77 68 65 72 65 20 77 65 | places |where we|
|00001900| 20 6b 6e 6f 77 20 69 74 | 27 73 20 73 61 66 65 2e | know it|'s safe.|
|00001910| 20 20 53 6f 20 69 66 20 | 77 65 20 65 6e 64 20 75 | So if |we end u|
|00001920| 70 20 73 70 69 6c 6c 69 | 6e 67 20 72 65 67 73 20 |p spilli|ng regs |
|00001930| 77 68 65 6e 0d 09 6f 6e | 65 20 77 61 73 20 72 65 |when..on|e was re|
|00001940| 61 6c 6c 79 20 66 72 65 | 65 20 61 6c 72 65 61 64 |ally fre|e alread|
|00001950| 79 2c 20 74 68 61 74 27 | 73 20 6a 75 73 74 20 62 |y, that'|s just b|
|00001960| 61 64 20 6c 75 63 6b 2e | 0d 2a 29 0d 0d 0d 3a 6d |ad luck.|.*)...:m|
|00001970| 20 47 45 54 46 52 45 45 | 52 45 47 3a 20 20 7b 20 | GETFREE|REG: { |
|00001980| 5c 20 66 6f 75 6e 64 3f | 20 72 65 67 23 20 23 69 |\ found?| reg# #i|
|00001990| 6e 41 63 74 69 76 65 20 | 65 61 72 6c 69 65 73 74 |nActive |earliest|
|000019a0| 49 6e 61 63 74 69 76 65 | 20 69 6e 61 63 74 69 76 |Inactive| inactiv|
|000019b0| 65 43 44 50 0d 09 09 09 | 09 09 73 70 69 6c 6c 65 |eCDP....|..spille|
|000019c0| 64 3f 20 2d 2d 20 72 65 | 67 23 20 7d 0d 0d 09 66 |d? -- re|g# }...f|
|000019d0| 61 6c 73 65 20 2d 3e 20 | 66 6f 75 6e 64 3f 20 20 |alse -> |found? |
|000019e0| 66 61 6c 73 65 20 2d 3e | 20 73 70 69 6c 6c 65 64 |false ->| spilled|
|000019f0| 3f 0d 09 30 20 2d 3e 20 | 23 69 6e 41 63 74 69 76 |?..0 -> |#inActiv|
|00001a00| 65 20 20 30 20 2d 3e 20 | 65 61 72 6c 69 65 73 74 |e 0 -> |earliest|
|00001a10| 49 6e 61 63 74 69 76 65 | 20 20 2d 31 20 2d 3e 20 |Inactive| -1 -> |
|00001a20| 69 6e 61 63 74 69 76 65 | 43 44 50 0d 0d 09 42 45 |inactive|CDP...BE|
|00001a30| 47 49 4e 09 09 09 5c 20 | 77 69 6c 6c 20 6c 6f 6f |GIN...\ |will loo|
|00001a40| 70 20 69 66 20 74 68 65 | 72 65 20 61 72 65 20 6e |p if the|re are n|
|00001a50| 6f 20 66 72 65 65 20 72 | 65 67 73 20 61 6e 64 20 |o free r|egs and |
|00001a60| 77 65 20 68 61 76 65 20 | 74 6f 20 73 70 69 6c 6c |we have |to spill|
|00001a70| 0d 0d 09 5c 20 66 69 72 | 73 74 20 77 65 20 74 72 |...\ fir|st we tr|
|00001a80| 79 20 74 6f 20 66 69 6e | 64 20 61 20 63 6f 6d 70 |y to fin|d a comp|
|00001a90| 6c 65 74 65 6c 79 20 75 | 6e 75 73 65 64 20 72 65 |letely u|nused re|
|00001aa0| 67 3a 0d 09 09 67 65 74 | 3a 20 61 6c 6c 6f 63 5f |g:...get|: alloc_|
|00001ab0| 6c 69 6d 69 74 20 31 2b | 20 30 0d 09 09 44 4f 09 |limit 1+| 0...DO.|
|00001ac0| 69 20 73 65 6c 65 63 74 | 3a 20 73 65 6c 66 0d 09 |i select|: self..|
|00001ad0| 09 09 69 73 5f 72 65 67 | 5f 75 6e 75 73 65 64 3f |..is_reg|_unused?|
|00001ae0| 3a 20 73 65 6c 66 0d 09 | 09 09 49 46 0d 09 09 09 |: self..|..IF....|
|00001af0| 09 64 65 62 75 67 3f 20 | 69 66 0d 09 09 09 09 09 |.debug? |if......|
|00001b00| 2e 22 20 61 6c 6c 6f 63 | 61 74 69 6e 67 20 65 6d |." alloc|ating em|
|00001b10| 70 74 79 20 72 65 67 20 | 22 20 69 20 2e 20 63 72 |pty reg |" i . cr|
|00001b20| 0d 09 09 09 09 74 68 65 | 6e 0d 09 09 09 09 63 6c |.....the|n.....cl|
|00001b30| 65 61 72 3a 20 73 65 6c | 66 20 20 61 6c 6c 6f 63 |ear: sel|f alloc|
|00001b40| 61 74 65 3a 20 73 65 6c | 66 0d 09 09 09 09 69 20 |ate: sel|f.....i |
|00001b50| 20 55 4e 4c 4f 4f 50 20 | 20 45 58 49 54 0d 09 09 | UNLOOP | EXIT...|
|00001b60| 09 54 48 45 4e 0d 09 09 | 09 67 65 74 3a 20 72 65 |.THEN...|.get: re|
|00001b70| 66 43 6e 74 0d 09 09 09 | 4e 49 46 09 31 20 2b 2b |fCnt....|NIF.1 ++|
|00001b80| 3e 20 23 69 6e 41 63 74 | 69 76 65 0d 09 09 09 09 |> #inAct|ive.....|
|00001b90| 67 65 74 3a 20 6c 61 73 | 74 52 65 66 43 44 50 20 |get: las|tRefCDP |
|00001ba0| 69 6e 61 63 74 69 76 65 | 43 44 50 20 75 3c 0d 09 |inactive|CDP u<..|
|00001bb0| 09 09 09 49 46 09 67 65 | 74 3a 20 6c 61 73 74 52 |...IF.ge|t: lastR|
|00001bc0| 65 66 43 44 50 20 2d 3e | 20 69 6e 61 63 74 69 76 |efCDP ->| inactiv|
|00001bd0| 65 43 44 50 0d 09 09 09 | 09 09 69 20 2d 3e 20 65 |eCDP....|..i -> e|
|00001be0| 61 72 6c 69 65 73 74 49 | 6e 61 63 74 69 76 65 0d |arliestI|nactive.|
|00001bf0| 09 09 09 09 54 48 45 4e | 0d 09 09 09 54 48 45 4e |....THEN|....THEN|
|00001c00| 0d 09 09 4c 4f 4f 50 0d | 0d 5c 20 6e 6f 74 20 66 |...LOOP.|.\ not f|
|00001c10| 6f 75 6e 64 20 79 65 74 | 2e 20 20 57 65 20 6e 6f |ound yet|. We no|
|00001c20| 77 20 6c 6f 6f 6b 20 66 | 6f 72 20 61 6e 20 69 6e |w look f|or an in|
|00001c30| 61 63 74 69 76 65 20 72 | 65 67 2e 0d 09 09 23 69 |active r|eg....#i|
|00001c40| 6e 61 63 74 69 76 65 20 | 30 3e 0d 09 09 49 46 0d |nactive |0>...IF.|
|00001c50| 09 09 09 65 61 72 6c 69 | 65 73 74 49 6e 61 63 74 |...earli|estInact|
|00001c60| 69 76 65 20 73 65 6c 65 | 63 74 3a 20 73 65 6c 66 |ive sele|ct: self|
|00001c70| 0d 09 09 09 64 65 62 75 | 67 3f 20 69 66 0d 09 09 |....debu|g? if...|
|00001c80| 09 09 2e 22 20 61 6c 6c | 6f 63 61 74 69 6e 67 20 |..." all|ocating |
|00001c90| 69 6e 61 63 74 69 76 65 | 20 72 65 67 20 22 20 70 |inactive| reg " p|
|00001ca0| 72 69 6e 74 3a 20 6d 79 | 52 65 66 20 63 72 0d 09 |rint: my|Ref cr..|
|00001cb0| 09 09 74 68 65 6e 0d 09 | 09 09 63 6c 65 61 72 3a |..then..|..clear:|
|00001cc0| 20 73 65 6c 66 20 20 61 | 6c 6c 6f 63 61 74 65 3a | self a|llocate:|
|00001cd0| 20 73 65 6c 66 0d 09 09 | 09 65 61 72 6c 69 65 73 | self...|.earlies|
|00001ce0| 74 49 6e 61 63 74 69 76 | 65 20 20 45 58 49 54 0d |tInactiv|e EXIT.|
|00001cf0| 09 09 54 48 45 4e 0d 09 | 09 0d 5c 20 73 74 69 6c |..THEN..|..\ stil|
|00001d00| 6c 20 6e 6f 6e 65 20 66 | 6f 75 6e 64 2e 20 20 57 |l none f|ound. W|
|00001d10| 65 20 6e 6f 77 20 73 70 | 69 6c 6c 20 74 6f 20 66 |e now sp|ill to f|
|00001d20| 72 65 65 20 75 70 20 73 | 6f 6d 65 20 72 65 67 73 |ree up s|ome regs|
|00001d30| 2e 20 20 49 66 20 77 65 | 27 76 65 0d 5c 20 20 61 |. If we|'ve.\ a|
|00001d40| 6c 72 65 61 64 79 20 73 | 70 69 6c 6c 65 64 2c 20 |lready s|pilled, |
|00001d50| 77 65 27 76 65 20 67 6f | 74 20 70 72 6f 62 6c 65 |we've go|t proble|
|00001d60| 6d 73 2e 20 20 48 6f 70 | 65 66 75 6c 6c 79 20 74 |ms. Hop|efully t|
|00001d70| 68 69 73 20 73 68 6f 75 | 6c 64 6e 27 74 0d 5c 20 |his shou|ldn't.\ |
|00001d80| 20 68 61 70 70 65 6e 2e | 0d 0d 09 09 73 70 69 6c | happen.|....spil|
|00001d90| 6c 65 64 3f 20 4e 49 46 | 20 20 73 65 6c 66 20 2d |led? NIF| self -|
|00001da0| 3e 20 73 70 69 6c 6c 4f | 44 73 20 20 73 70 69 6c |> spillO|Ds spil|
|00001db0| 6c 20 20 45 4c 53 45 20 | 20 32 31 31 20 64 69 65 |l ELSE | 211 die|
|00001dc0| 20 20 54 48 45 4e 0d 0d | 09 41 47 41 49 4e 0d 3b | THEN..|.AGAIN.;|
|00001dd0| 6d 0d 0d 0d 3a 6d 20 41 | 4c 4c 4f 43 41 54 45 5f |m...:m A|LLOCATE_|
|00001de0| 52 45 47 3a 09 5c 20 28 | 20 72 65 67 23 20 2d 2d |REG:.\ (| reg# --|
|00001df0| 20 29 0d 09 73 65 6c 65 | 63 74 3a 20 73 65 6c 66 | )..sele|ct: self|
|00001e00| 20 20 61 6c 6c 6f 63 61 | 74 65 3a 20 73 65 6c 66 | alloca|te: self|
|00001e10| 20 20 3b 6d 0d 0d 3a 6d | 20 46 52 45 45 5f 52 45 | ;m..:m| FREE_RE|
|00001e20| 47 3a 09 09 5c 20 28 20 | 72 65 67 23 20 2d 2d 20 |G:..\ ( |reg# -- |
|00001e30| 29 0d 09 73 65 6c 65 63 | 74 3a 20 73 65 6c 66 20 |)..selec|t: self |
|00001e40| 20 66 72 65 65 3a 20 73 | 65 6c 66 20 20 3b 6d 0d | free: s|elf ;m.|
|00001e50| 0d 3a 6d 20 3f 44 45 4c | 45 54 45 5f 52 45 47 3a |.:m ?DEL|ETE_REG:|
|00001e60| 09 09 5c 20 28 20 72 65 | 67 23 20 2d 2d 20 29 0d |..\ ( re|g# -- ).|
|00001e70| 09 73 65 6c 65 63 74 3a | 20 73 65 6c 66 20 20 3f |.select:| self ?|
|00001e80| 64 65 6c 65 74 65 3a 20 | 73 65 6c 66 20 20 3b 6d |delete: |self ;m|
|00001e90| 0d 0d 0d 3a 6d 20 4d 41 | 54 43 48 3f 3a 20 20 7b |...:m MA|TCH?: {|
|00001ea0| 20 5e 4f 44 20 63 61 6e | 42 65 53 70 65 63 69 61 | ^OD can|BeSpecia|
|00001eb0| 6c 3f 20 5c 20 73 76 43 | 75 72 72 65 6e 74 20 2d |l? \ svC|urrent -|
|00001ec0| 2d 20 62 20 7d 0d 09 67 | 65 74 3a 20 63 75 72 72 |- b }..g|et: curr|
|00001ed0| 65 6e 74 20 2d 3e 20 73 | 76 43 75 72 72 65 6e 74 |ent -> s|vCurrent|
|00001ee0| 0d 09 6c 69 6d 69 74 20 | 30 0d 09 44 4f 09 69 20 |..limit |0..DO.i |
|00001ef0| 73 65 6c 65 63 74 3a 20 | 73 65 6c 66 0d 09 09 67 |select: |self...g|
|00001f00| 65 74 3a 20 73 70 65 63 | 69 61 6c 3f 0d 09 09 49 |et: spec|ial?...I|
|00001f10| 46 09 09 63 61 6e 42 65 | 53 70 65 63 69 61 6c 3f |F..canBe|Special?|
|00001f20| 0d 09 09 45 4c 53 45 09 | 74 72 75 65 0d 09 09 54 |...ELSE.|true...T|
|00001f30| 48 45 4e 0d 09 09 49 46 | 09 5e 4f 44 20 20 3d 3f |HEN...IF|.^OD =?|
|00001f40| 3a 20 73 65 6c 66 0d 09 | 09 09 49 46 20 20 09 09 |: self..|..IF ..|
|00001f50| 5c 20 65 71 75 61 6c 2c | 20 62 75 74 20 6e 65 65 |\ equal,| but nee|
|00001f60| 64 20 74 6f 20 63 68 65 | 63 6b 20 6c 69 6d 69 74 |d to che|ck limit|
|00001f70| 20 6f 6e 20 76 61 6c 69 | 64 69 74 79 0d 09 09 09 | on vali|dity....|
|00001f80| 09 43 44 50 20 20 67 65 | 74 3a 20 76 61 6c 69 64 |.CDP ge|t: valid|
|00001f90| 54 69 6c 6c 43 44 50 20 | 20 75 3c 0d 09 09 09 09 |TillCDP | u<.....|
|00001fa0| 49 46 20 20 75 6e 6c 6f | 6f 70 20 20 74 72 75 65 |IF unlo|op true|
|00001fb0| 0d 09 09 09 09 09 64 65 | 62 75 67 3f 20 69 66 0d |......de|bug? if.|
|00001fc0| 09 09 09 09 09 09 2e 22 | 20 6d 61 74 63 68 3f 3a |......."| match?:|
|00001fd0| 20 6d 61 74 63 68 65 64 | 20 6f 6e 20 74 68 69 73 | matched| on this|
|00001fe0| 20 72 65 67 3a 20 22 20 | 70 72 69 6e 74 3a 20 6d | reg: " |print: m|
|00001ff0| 79 52 65 66 20 63 72 0d | 09 09 09 09 09 74 68 65 |yRef cr.|.....the|
|00002000| 6e 0d 09 09 09 09 09 45 | 58 49 54 0d 09 09 09 09 |n......E|XIT.....|
|00002010| 54 48 45 4e 0d 09 09 09 | 54 48 45 4e 0d 09 09 54 |THEN....|THEN...T|
|00002020| 48 45 4e 0d 09 4c 4f 4f | 50 0d 09 73 76 43 75 72 |HEN..LOO|P..svCur|
|00002030| 72 65 6e 74 20 20 73 65 | 6c 65 63 74 3a 20 73 65 |rent se|lect: se|
|00002040| 6c 66 0d 09 66 61 6c 73 | 65 0d 3b 6d 0d 0d 0d 3a |lf..fals|e.;m...:|
|00002050| 6d 20 63 6c 65 61 72 41 | 6c 6c 3a 0d 09 6c 69 6d |m clearA|ll:..lim|
|00002060| 69 74 20 30 0d 09 44 4f | 09 69 20 73 65 6c 65 63 |it 0..DO|.i selec|
|00002070| 74 3a 20 73 65 6c 66 20 | 20 66 75 6c 6c 5f 63 6c |t: self | full_cl|
|00002080| 65 61 72 3a 20 73 65 6c | 66 0d 09 4c 4f 4f 50 0d |ear: sel|f..LOOP.|
|00002090| 09 2d 31 20 70 75 74 3a | 20 6c 61 73 74 5f 61 6c |.-1 put:| last_al|
|000020a0| 6c 6f 63 61 74 65 64 0d | 3b 6d 0d 0d 3a 6d 20 63 |located.|;m..:m c|
|000020b0| 6c 65 61 72 41 6c 6c 56 | 6f 6c 61 74 69 6c 65 3a |learAllV|olatile:|
|000020c0| 0d 09 09 5c 20 63 61 6c | 6c 65 64 20 77 68 65 6e |...\ cal|led when|
|000020d0| 20 77 65 20 64 6f 6e 27 | 74 20 77 61 6e 74 20 61 | we don'|t want a|
|000020e0| 20 66 75 6c 6c 20 63 6c | 65 61 72 20 6f 6e 20 74 | full cl|ear on t|
|000020f0| 68 65 20 6e 6f 6e 76 6f | 6c 61 74 69 6c 65 20 72 |he nonvo|latile r|
|00002100| 65 67 73 2e 0d 09 67 65 | 74 3a 20 31 73 74 5f 6e |egs...ge|t: 1st_n|
|00002110| 6f 6e 76 6f 6c 61 74 69 | 6c 65 20 20 30 0d 09 44 |onvolati|le 0..D|
|00002120| 4f 09 69 20 73 65 6c 65 | 63 74 3a 20 73 65 6c 66 |O.i sele|ct: self|
|00002130| 20 20 66 75 6c 6c 5f 63 | 6c 65 61 72 3a 20 73 65 | full_c|lear: se|
|00002140| 6c 66 0d 09 4c 4f 4f 50 | 0d 09 2d 31 20 70 75 74 |lf..LOOP|..-1 put|
|00002150| 3a 20 6c 61 73 74 5f 61 | 6c 6c 6f 63 61 74 65 64 |: last_a|llocated|
|00002160| 0d 3b 6d 0d 0d 3a 6d 20 | 6d 61 6b 65 5f 6e 6f 6e |.;m..:m |make_non|
|00002170| 76 6f 6c 61 74 69 6c 65 | 73 5f 75 6e 6b 6e 6f 77 |volatile|s_unknow|
|00002180| 6e 3a 0d 09 6c 69 6d 69 | 74 20 20 67 65 74 3a 20 |n:..limi|t get: |
|00002190| 31 73 74 5f 6e 6f 6e 76 | 6f 6c 61 74 69 6c 65 0d |1st_nonv|olatile.|
|000021a0| 09 44 4f 09 69 20 73 65 | 6c 65 63 74 3a 20 73 65 |.DO.i se|lect: se|
|000021b0| 6c 66 0d 09 09 6f 74 55 | 6e 6b 6e 6f 77 6e 20 20 |lf...otU|nknown |
|000021c0| 70 75 74 3a 20 6f 70 54 | 79 70 65 0d 09 4c 4f 4f |put: opT|ype..LOO|
|000021d0| 50 0d 3b 6d 0d 0d 3a 6d | 20 49 4e 56 41 4c 49 44 |P.;m..:m| INVALID|
|000021e0| 41 54 45 5f 41 4c 4c 3a | 09 09 5c 20 77 68 65 6e |ATE_ALL:|..\ when|
|000021f0| 20 77 65 20 6a 75 73 74 | 20 6e 65 65 64 20 74 6f | we just| need to|
|00002200| 20 69 6e 76 61 6c 69 64 | 61 74 65 2c 20 6e 6f 74 | invalid|ate, not|
|00002210| 20 63 6f 6d 70 6c 65 74 | 65 6c 79 20 63 6c 65 61 | complet|ely clea|
|00002220| 72 0d 09 6c 69 6d 69 74 | 20 30 0d 09 44 4f 09 69 |r..limit| 0..DO.i|
|00002230| 20 73 65 6c 65 63 74 3a | 20 73 65 6c 66 20 20 63 | select:| self c|
|00002240| 6c 65 61 72 3a 20 6f 70 | 54 79 70 65 0d 09 4c 4f |lear: op|Type..LO|
|00002250| 4f 50 0d 3b 6d 0d 0d 0d | 3a 6d 20 43 4c 45 41 52 |OP.;m...|:m CLEAR|
|00002260| 5f 52 45 46 43 4e 54 53 | 3a 09 09 5c 20 63 61 6c |_REFCNTS|:..\ cal|
|00002270| 6c 65 64 20 66 72 6f 6d | 20 75 70 64 61 74 65 5f |led from| update_|
|00002280| 72 65 66 63 6e 74 73 20 | 2d 20 73 65 65 20 63 6f |refcnts |- see co|
|00002290| 6d 6d 65 6e 74 20 74 68 | 65 72 65 2e 0d 09 67 65 |mment th|ere...ge|
|000022a0| 74 3a 20 63 75 72 72 65 | 6e 74 0d 09 67 65 74 3a |t: curre|nt..get:|
|000022b0| 20 61 6c 6c 6f 63 5f 6c | 69 6d 69 74 20 30 0d 09 | alloc_l|imit 0..|
|000022c0| 44 4f 09 69 20 73 65 6c | 65 63 74 3a 20 73 65 6c |DO.i sel|ect: sel|
|000022d0| 66 20 20 63 6c 65 61 72 | 3a 20 72 65 66 43 6e 74 |f clear|: refCnt|
|000022e0| 0d 09 4c 4f 4f 50 0d 09 | 73 65 6c 65 63 74 3a 20 |..LOOP..|select: |
|000022f0| 73 65 6c 66 0d 3b 6d 0d | 0d 0d 5c 20 55 50 44 41 |self.;m.|..\ UPDA|
|00002300| 54 45 5f 41 4c 4c 5f 52 | 45 46 53 3a 20 72 65 70 |TE_ALL_R|EFS: rep|
|00002310| 6c 61 63 65 73 20 61 6c | 6c 20 6f 63 63 75 72 72 |laces al|l occurr|
|00002320| 65 6e 63 65 73 20 6f 66 | 20 6f 6c 64 52 65 66 20 |ences of| oldRef |
|00002330| 62 79 20 6e 65 77 52 65 | 66 20 69 6e 0d 5c 20 74 |by newRe|f in.\ t|
|00002340| 68 65 20 4f 44 20 61 72 | 72 61 79 2e 20 20 55 73 |he OD ar|ray. Us|
|00002350| 65 64 20 77 68 65 6e 20 | 77 65 27 76 65 20 6d 6f |ed when |we've mo|
|00002360| 76 65 64 20 61 20 72 65 | 67 69 73 74 65 72 2e 0d |ved a re|gister..|
|00002370| 0d 3a 6d 20 55 50 44 41 | 54 45 5f 41 4c 4c 5f 52 |.:m UPDA|TE_ALL_R|
|00002380| 45 46 53 3a 20 20 7b 20 | 5e 6f 6c 64 52 65 66 20 |EFS: { |^oldRef |
|00002390| 5e 6e 65 77 52 65 66 20 | 66 72 6f 6d 43 44 50 20 |^newRef |fromCDP |
|000023a0| 2d 2d 20 7d 0d 09 67 65 | 74 3a 20 63 75 72 72 65 |-- }..ge|t: curre|
|000023b0| 6e 74 0d 09 6c 69 6d 69 | 74 20 30 0d 09 44 4f 09 |nt..limi|t 0..DO.|
|000023c0| 69 20 73 65 6c 65 63 74 | 3a 20 73 65 6c 66 20 20 |i select|: self |
|000023d0| 5e 6f 6c 64 52 65 66 20 | 5e 6e 65 77 52 65 66 20 |^oldRef |^newRef |
|000023e0| 66 72 6f 6d 43 44 50 20 | 20 75 70 64 61 74 65 5f |fromCDP | update_|
|000023f0| 72 65 66 73 3a 20 73 65 | 6c 66 0d 09 4c 4f 4f 50 |refs: se|lf..LOOP|
|00002400| 0d 09 73 65 6c 65 63 74 | 3a 20 73 65 6c 66 0d 3b |..select|: self.;|
|00002410| 6d 0d 0d 5c 20 52 45 47 | 5f 43 48 41 4e 47 45 44 |m..\ REG|_CHANGED|
|00002420| 3a 20 6c 6f 6f 6b 73 20 | 61 66 74 65 72 20 74 68 |: looks |after th|
|00002430| 65 20 73 69 74 75 61 74 | 69 6f 6e 20 77 68 65 72 |e situat|ion wher|
|00002440| 65 20 61 20 72 65 67 20 | 69 73 20 67 65 74 74 69 |e a reg |is getti|
|00002450| 6e 67 20 63 68 61 6e 67 | 65 64 2c 0d 5c 20 73 6f |ng chang|ed,.\ so|
|00002460| 20 66 6f 72 20 61 6e 79 | 20 72 65 67 73 20 77 68 | for any| regs wh|
|00002470| 69 63 68 20 64 65 70 65 | 6e 64 20 6f 6e 20 74 68 |ich depe|nd on th|
|00002480| 65 20 63 68 61 6e 67 65 | 64 20 72 65 67 2c 20 77 |e change|d reg, w|
|00002490| 65 20 6e 65 65 64 20 74 | 6f 20 73 65 74 20 69 74 |e need t|o set it|
|000024a0| 73 0d 5c 20 76 61 6c 69 | 64 54 69 6c 6c 43 44 50 |s.\ vali|dTillCDP|
|000024b0| 20 69 76 61 72 20 74 6f | 20 74 68 65 20 63 75 72 | ivar to| the cur|
|000024c0| 72 65 6e 74 20 43 44 50 | 2e 0d 0d 3a 6d 20 52 45 |rent CDP|...:m RE|
|000024d0| 47 5f 43 48 41 4e 47 45 | 44 3a 20 20 7b 20 5e 72 |G_CHANGE|D: { ^r|
|000024e0| 65 66 20 2d 2d 20 7d 0d | 09 67 65 74 3a 20 63 75 |ef -- }.|.get: cu|
|000024f0| 72 72 65 6e 74 0d 09 6c | 69 6d 69 74 20 30 0d 09 |rrent..l|imit 0..|
|00002500| 44 4f 09 69 20 73 65 6c | 65 63 74 3a 20 73 65 6c |DO.i sel|ect: sel|
|00002510| 66 20 20 5e 72 65 66 20 | 3f 61 6e 74 65 63 65 64 |f ^ref |?anteced|
|00002520| 65 6e 74 5f 63 68 61 6e | 67 65 64 3a 20 73 65 6c |ent_chan|ged: sel|
|00002530| 66 0d 09 4c 4f 4f 50 0d | 09 73 65 6c 65 63 74 3a |f..LOOP.|.select:|
|00002540| 20 73 65 6c 66 0d 3b 6d | 0d 0d 0d 3a 6d 20 49 4e | self.;m|...:m IN|
|00002550| 56 41 4c 49 44 41 54 45 | 5f 4f 4e 5f 4f 56 45 52 |VALIDATE|_ON_OVER|
|00002560| 4c 41 50 3a 20 20 7b 20 | 5e 4f 44 20 5c 20 73 76 |LAP: { |^OD \ sv|
|00002570| 43 75 72 72 65 6e 74 20 | 2d 2d 20 7d 0d 09 67 65 |Current |-- }..ge|
|00002580| 74 3a 20 63 75 72 72 65 | 6e 74 20 2d 3e 20 73 76 |t: curre|nt -> sv|
|00002590| 43 75 72 72 65 6e 74 0d | 09 6c 69 6d 69 74 20 30 |Current.|.limit 0|
|000025a0| 0d 09 44 4f 09 69 20 73 | 65 6c 65 63 74 3a 20 73 |..DO.i s|elect: s|
|000025b0| 65 6c 66 0d 09 09 5e 4f | 44 20 20 6f 76 65 72 6c |elf...^O|D overl|
|000025c0| 61 70 3f 3a 20 73 65 6c | 66 0d 09 09 49 46 20 20 |ap?: sel|f...IF |
|000025d0| 09 09 5c 20 6f 76 65 72 | 6c 61 70 73 2c 20 62 75 |..\ over|laps, bu|
|000025e0| 74 20 6e 65 65 64 20 74 | 6f 20 63 68 65 63 6b 20 |t need t|o check |
|000025f0| 6c 69 6d 69 74 20 6f 6e | 20 76 61 6c 69 64 69 74 |limit on| validit|
|00002600| 79 0d 09 09 09 43 44 50 | 20 20 67 65 74 3a 20 76 |y....CDP| get: v|
|00002610| 61 6c 69 64 54 69 6c 6c | 43 44 50 20 20 75 3c 0d |alidTill|CDP u<.|
|00002620| 09 09 09 49 46 0d 09 09 | 09 09 64 65 62 75 67 3f |...IF...|..debug?|
|00002630| 20 69 66 0d 09 09 09 09 | 09 62 6c 69 74 3a 20 73 | if.....|.blit: s|
|00002640| 65 6c 66 20 20 2e 68 20 | 20 5e 4f 44 20 62 6c 69 |elf .h | ^OD bli|
|00002650| 74 3a 20 63 6c 61 73 73 | 5f 61 73 3e 20 4f 44 20 |t: class|_as> OD |
|00002660| 2e 68 20 63 72 0d 09 09 | 09 09 09 2e 22 20 6f 76 |.h cr...|...." ov|
|00002670| 65 72 6c 61 70 3f 3a 20 | 6d 61 74 63 68 65 64 20 |erlap?: |matched |
|00002680| 6f 6e 20 74 68 69 73 20 | 72 65 67 3a 20 22 20 70 |on this |reg: " p|
|00002690| 72 69 6e 74 3a 20 73 65 | 6c 66 20 63 72 0d 09 09 |rint: se|lf cr...|
|000026a0| 09 09 09 2e 22 20 6f 76 | 65 72 6c 61 70 70 69 6e |...." ov|erlappin|
|000026b0| 67 20 4f 44 3a 20 22 20 | 20 70 72 69 6e 74 3a 20 |g OD: " | print: |
|000026c0| 5b 20 5e 4f 44 20 5d 20 | 63 72 0d 09 09 09 09 74 |[ ^OD ] |cr.....t|
|000026d0| 68 65 6e 0d 0d 09 09 09 | 09 43 44 50 20 34 2d 20 |hen.....|.CDP 4- |
|000026e0| 20 70 75 74 3a 20 76 61 | 6c 69 64 54 69 6c 6c 43 | put: va|lidTillC|
|000026f0| 44 50 0d 09 09 09 09 6f | 74 55 6e 6b 6e 6f 77 6e |DP.....o|tUnknown|
|00002700| 20 20 70 75 74 3a 20 6f | 70 54 79 70 65 0d 09 09 | put: o|pType...|
|00002710| 09 09 6e 6f 54 79 70 65 | 09 20 20 20 70 75 74 3a |..noType|. put:|
|00002720| 20 69 6e 73 74 72 6e 54 | 79 70 65 0d 09 09 09 09 | instrnT|ype.....|
|00002730| 61 64 64 72 3a 20 6d 79 | 52 65 66 20 20 72 65 67 |addr: my|Ref reg|
|00002740| 5f 63 68 61 6e 67 65 64 | 3a 20 73 65 6c 66 0d 09 |_changed|: self..|
|00002750| 09 09 54 48 45 4e 0d 09 | 09 54 48 45 4e 0d 09 4c |..THEN..|.THEN..L|
|00002760| 4f 4f 50 0d 09 73 76 43 | 75 72 72 65 6e 74 20 20 |OOP..svC|urrent |
|00002770| 73 65 6c 65 63 74 3a 20 | 73 65 6c 66 0d 3b 6d 0d |select: |self.;m.|
|00002780| 0d 0d 3a 6d 20 55 50 44 | 41 54 45 5f 6f 70 43 44 |..:m UPD|ATE_opCD|
|00002790| 50 73 3a 0d 09 67 65 74 | 3a 20 63 75 72 72 65 6e |Ps:..get|: curren|
|000027a0| 74 0d 09 6c 69 6d 69 74 | 20 30 0d 09 44 4f 09 69 |t..limit| 0..DO.i|
|000027b0| 20 73 65 6c 65 63 74 3a | 20 73 65 6c 66 20 20 75 | select:| self u|
|000027c0| 70 64 61 74 65 5f 6f 70 | 43 44 50 3a 20 73 65 6c |pdate_op|CDP: sel|
|000027d0| 66 0d 09 4c 4f 4f 50 0d | 09 73 65 6c 65 63 74 3a |f..LOOP.|.select:|
|000027e0| 20 73 65 6c 66 0d 3b 6d | 0d 0d 3a 6d 20 4d 41 4b | self.;m|..:m MAK|
|000027f0| 45 5f 41 4c 54 45 52 45 | 44 5f 52 45 47 53 5f 55 |E_ALTERE|D_REGS_U|
|00002800| 4e 4b 4e 4f 57 4e 3a 0d | 09 67 65 74 3a 20 63 75 |NKNOWN:.|.get: cu|
|00002810| 72 72 65 6e 74 0d 09 6c | 69 6d 69 74 20 30 0d 09 |rrent..l|imit 0..|
|00002820| 44 4f 09 69 20 73 65 6c | 65 63 74 3a 20 73 65 6c |DO.i sel|ect: sel|
|00002830| 66 20 20 6d 61 6b 65 5f | 75 6e 6b 6e 6f 77 6e 5f |f make_|unknown_|
|00002840| 69 66 5f 61 6c 74 65 72 | 65 64 3a 20 73 65 6c 66 |if_alter|ed: self|
|00002850| 0d 09 4c 4f 4f 50 0d 09 | 73 65 6c 65 63 74 3a 20 |..LOOP..|select: |
|00002860| 73 65 6c 66 0d 3b 6d 0d | 0d 0d 3a 6d 20 4d 41 4b |self.;m.|..:m MAK|
|00002870| 45 5f 46 45 54 43 48 45 | 53 5f 55 4e 4b 4e 4f 57 |E_FETCHE|S_UNKNOW|
|00002880| 4e 3a 0d 09 67 65 74 3a | 20 63 75 72 72 65 6e 74 |N:..get:| current|
|00002890| 0d 09 6c 69 6d 69 74 20 | 30 0d 09 44 4f 09 69 20 |..limit |0..DO.i |
|000028a0| 73 65 6c 65 63 74 3a 20 | 73 65 6c 66 20 20 6d 61 |select: |self ma|
|000028b0| 6b 65 5f 75 6e 6b 6e 6f | 77 6e 5f 69 66 5f 66 65 |ke_unkno|wn_if_fe|
|000028c0| 74 63 68 3a 20 73 65 6c | 66 0d 09 4c 4f 4f 50 0d |tch: sel|f..LOOP.|
|000028d0| 09 73 65 6c 65 63 74 3a | 20 73 65 6c 66 0d 3b 6d |.select:| self.;m|
|000028e0| 0d 0d 0d 3a 6d 20 3f 48 | 4f 49 53 54 5f 41 4c 4c |...:m ?H|OIST_ALL|
|000028f0| 3a 0d 09 67 65 74 3a 20 | 63 75 72 72 65 6e 74 0d |:..get: |current.|
|00002900| 09 6c 69 6d 69 74 20 31 | 0d 09 44 4f 09 69 20 73 |.limit 1|..DO.i s|
|00002910| 65 6c 65 63 74 3a 20 73 | 65 6c 66 20 20 3f 68 6f |elect: s|elf ?ho|
|00002920| 69 73 74 3a 20 73 65 6c | 66 20 20 64 72 6f 70 0d |ist: sel|f drop.|
|00002930| 09 4c 4f 4f 50 0d 09 73 | 65 6c 65 63 74 3a 20 73 |.LOOP..s|elect: s|
|00002940| 65 6c 66 0d 3b 6d 0d 0d | 0d 28 2a 20 4d 4f 56 45 |elf.;m..|.(* MOVE|
|00002950| 52 45 47 3a 20 6d 6f 76 | 65 73 20 61 6e 20 6f 70 |REG: mov|es an op|
|00002960| 65 72 61 6e 64 20 66 72 | 6f 6d 20 6f 6e 65 20 72 |erand fr|om one r|
|00002970| 65 67 20 74 6f 20 61 20 | 64 69 66 66 65 72 65 6e |eg to a |differen|
|00002980| 74 20 6f 6e 65 20 2d 20 | 77 65 20 6d 69 67 68 74 |t one - |we might|
|00002990| 20 68 61 76 65 0d 20 20 | 20 74 6f 20 64 6f 20 74 | have. | to do t|
|000029a0| 68 69 73 20 77 68 65 6e | 20 65 71 75 61 6c 69 7a |his when| equaliz|
|000029b0| 69 6e 67 20 74 68 65 20 | 73 74 61 63 6b 2c 20 66 |ing the |stack, f|
|000029c0| 6f 72 20 65 78 61 6d 70 | 6c 65 2e 20 20 49 66 20 |or examp|le. If |
|000029d0| 70 6f 73 73 69 62 6c 65 | 20 77 65 20 6a 75 73 74 |possible| we just|
|000029e0| 0d 20 20 20 72 65 63 6f | 6d 70 69 6c 65 20 74 68 |. reco|mpile th|
|000029f0| 65 20 6f 70 65 72 61 74 | 69 6f 6e 20 74 68 61 74 |e operat|ion that|
|00002a00| 20 67 65 6e 65 72 61 74 | 65 64 20 74 68 65 20 6f | generat|ed the o|
|00002a10| 72 69 67 69 6e 61 6c 20 | 72 65 73 75 6c 74 2c 20 |riginal |result, |
|00002a20| 74 6f 20 67 65 6e 65 72 | 61 74 65 20 69 74 0d 20 |to gener|ate it. |
|00002a30| 20 20 73 74 72 61 69 67 | 68 74 20 69 6e 20 74 68 | straig|ht in th|
|00002a40| 65 20 6e 65 77 20 72 65 | 67 2e 20 20 49 66 20 61 |e new re|g. If a|
|00002a50| 6c 6c 20 65 6c 73 65 20 | 66 61 69 6c 73 20 77 65 |ll else |fails we|
|00002a60| 27 6c 6c 20 61 63 74 75 | 61 6c 6c 79 20 63 6f 6d |'ll actu|ally com|
|00002a70| 70 69 6c 65 20 61 6e 0d | 20 20 20 69 6e 73 74 72 |pile an.| instr|
|00002a80| 75 63 74 69 6f 6e 20 74 | 6f 20 6d 6f 76 65 20 74 |uction t|o move t|
|00002a90| 68 65 20 6f 70 65 72 61 | 6e 64 2e 0d 20 20 20 57 |he opera|nd.. W|
|00002aa0| 65 20 6c 65 61 76 65 20 | 74 68 65 20 64 65 73 74 |e leave |the dest|
|00002ab0| 69 6e 61 74 69 6f 6e 20 | 72 65 67 69 73 74 65 72 |ination |register|
|00002ac0| 20 73 65 6c 65 63 74 65 | 64 2e 0d 2a 29 0d 0d 0d | selecte|d..*)...|
|00002ad0| 3a 6d 20 52 45 47 5f 4d | 4f 56 45 44 3a 20 20 7b |:m REG_M|OVED: {|
|00002ae0| 20 6f 6c 64 23 20 72 65 | 63 6f 6d 70 69 6c 65 64 | old# re|compiled|
|00002af0| 3f 20 2d 2d 20 7d 0d 09 | 09 09 5c 20 68 6f 75 73 |? -- }..|..\ hous|
|00002b00| 65 6b 65 65 70 69 6e 67 | 20 72 6f 75 74 69 6e 65 |ekeeping| routine|
|00002b10| 20 63 61 6c 6c 65 64 20 | 61 66 74 65 72 20 61 20 | called |after a |
|00002b20| 6d 6f 76 65 2e 20 20 54 | 68 65 20 6e 65 77 20 72 |move. T|he new r|
|00002b30| 65 67 20 69 73 20 63 75 | 72 72 65 6e 74 6c 79 0d |eg is cu|rrently.|
|00002b40| 09 09 09 5c 20 73 65 6c | 65 63 74 65 64 2e 20 20 |...\ sel|ected. |
|00002b50| 57 65 20 75 70 64 61 74 | 65 20 72 65 66 65 72 65 |We updat|e refere|
|00002b60| 6e 63 65 73 20 61 6e 64 | 20 63 6c 65 61 72 20 74 |nces and| clear t|
|00002b70| 68 65 20 6f 6c 64 20 72 | 65 67 2e 0d 0d 09 64 65 |he old r|eg....de|
|00002b80| 62 75 67 3f 20 69 66 0d | 09 09 2e 22 20 72 65 67 |bug? if.|..." reg|
|00002b90| 5f 6d 6f 76 65 64 3a 20 | 63 61 6c 6c 65 64 20 2d |_moved: |called -|
|00002ba0| 20 64 65 73 74 3a 22 20 | 70 72 69 6e 74 3a 20 73 | dest:" |print: s|
|00002bb0| 65 6c 66 0d 09 74 68 65 | 6e 0d 09 0d 09 61 64 64 |elf..the|n....add|
|00002bc0| 72 3a 20 6d 79 52 65 66 | 20 20 64 75 70 20 20 2d |r: myRef| dup -|
|00002bd0| 3e 3a 20 74 6d 70 52 65 | 66 31 20 20 2d 3e 3a 20 |>: tmpRe|f1 ->: |
|00002be0| 74 6d 70 52 65 66 32 20 | 20 6f 6c 64 23 20 3e 72 |tmpRef2 | old# >r|
|00002bf0| 65 67 3a 20 74 6d 70 52 | 65 66 31 0d 09 74 6d 70 |eg: tmpR|ef1..tmp|
|00002c00| 52 65 66 31 20 74 6d 70 | 52 65 66 32 20 20 67 65 |Ref1 tmp|Ref2 ge|
|00002c10| 74 3a 20 6f 70 43 44 50 | 20 34 2b 0d 09 63 75 72 |t: opCDP| 4+..cur|
|00002c20| 72 65 6e 74 3a 20 73 65 | 6c 66 20 20 6f 6c 64 23 |rent: se|lf old#|
|00002c30| 20 73 65 6c 65 63 74 3a | 20 73 65 6c 66 0d 09 5c | select:| self..\|
|00002c40| 20 63 6c 65 61 72 3a 20 | 73 75 70 65 72 0d 09 72 | clear: |super..r|
|00002c50| 65 63 6f 6d 70 69 6c 65 | 64 3f 0d 09 49 46 09 09 |ecompile|d?..IF..|
|00002c60| 63 6c 65 61 72 3a 20 73 | 65 6c 66 20 20 72 65 66 |clear: s|elf ref|
|00002c70| 5f 67 6f 6e 65 3a 20 73 | 65 6c 66 0d 09 45 4c 53 |_gone: s|elf..ELS|
|00002c80| 45 09 43 44 50 20 34 2d | 20 70 75 74 3a 20 6c 61 |E.CDP 4-| put: la|
|00002c90| 73 74 52 65 66 43 44 50 | 0d 09 54 48 45 4e 0d 09 |stRefCDP|..THEN..|
|00002ca0| 73 65 6c 65 63 74 3a 20 | 73 65 6c 66 0d 09 75 70 |select: |self..up|
|00002cb0| 64 61 74 65 5f 72 65 66 | 73 0d 3b 6d 0d 0d 0d 3a |date_ref|s.;m...:|
|00002cc0| 6d 20 4d 4f 56 45 52 45 | 47 5f 42 59 5f 52 45 43 |m MOVERE|G_BY_REC|
|00002cd0| 4f 4d 50 49 4c 49 4e 47 | 3f 3a 20 20 7b 20 6f 6c |OMPILING|?: { ol|
|00002ce0| 64 23 20 6e 65 77 23 20 | 2d 2d 20 72 65 63 6f 6d |d# new# |-- recom|
|00002cf0| 70 69 6c 65 3f 20 7d 0d | 09 6f 6c 64 23 20 73 65 |pile? }.|.old# se|
|00002d00| 6c 65 63 74 3a 20 73 65 | 6c 66 0d 09 61 64 64 72 |lect: se|lf..addr|
|00002d10| 3a 20 73 65 6c 66 20 20 | 63 6f 70 79 4f 44 3a 20 |: self |copyOD: |
|00002d20| 74 68 65 4f 44 09 5c 20 | 6d 6f 76 65 20 6f 6c 64 |theOD.\ |move old|
|00002d30| 20 6f 70 65 72 61 6e 64 | 20 69 6e 74 6f 20 74 68 | operand| into th|
|00002d40| 65 4f 44 20 66 6f 72 20 | 63 6f 6e 76 65 6e 69 65 |eOD for |convenie|
|00002d50| 6e 63 65 0d 09 09 09 09 | 09 09 09 09 5c 20 20 6e |nce.....|....\ n|
|00002d60| 65 65 64 20 41 4c 4c 20 | 69 76 61 72 73 20 75 6e |eed ALL |ivars un|
|00002d70| 63 68 61 6e 67 65 64 20 | 69 6e 20 74 68 69 73 20 |changed |in this |
|00002d80| 6d 6f 76 65 0d 09 6e 65 | 77 23 20 73 65 6c 65 63 |move..ne|w# selec|
|00002d90| 74 3a 20 73 65 6c 66 0d | 0d 09 72 65 63 6f 6d 70 |t: self.|..recomp|
|00002da0| 54 65 73 74 3f 20 69 66 | 0d 09 09 2e 22 20 6d 6f |Test? if|...." mo|
|00002db0| 76 65 72 65 67 5f 62 79 | 5f 72 65 63 6f 6d 70 69 |vereg_by|_recompi|
|00002dc0| 6c 69 6e 67 3f 22 20 63 | 72 0d 09 09 2e 22 20 73 |ling?" c|r...." s|
|00002dd0| 6f 75 72 63 65 20 72 65 | 67 20 69 6e 20 74 68 65 |ource re|g in the|
|00002de0| 4f 44 3a 22 09 70 72 69 | 6e 74 3a 20 74 68 65 4f |OD:".pri|nt: theO|
|00002df0| 44 20 63 72 0d 09 09 2e | 22 20 64 65 73 74 20 72 |D cr....|" dest r|
|00002e00| 65 67 3a 20 20 20 20 20 | 20 20 20 20 20 20 22 09 |eg: | ".|
|00002e10| 70 72 69 6e 74 3a 20 73 | 65 6c 66 20 20 63 72 0d |print: s|elf cr.|
|00002e20| 09 09 2e 22 20 65 71 5f | 62 6c 6f 63 6b 5f 72 65 |..." eq_|block_re|
|00002e30| 63 6f 6d 70 69 6c 69 6e | 67 5f 6d 6f 76 65 3f 20 |compilin|g_move? |
|00002e40| 22 09 65 71 5f 62 6c 6f | 63 6b 5f 72 65 63 6f 6d |".eq_blo|ck_recom|
|00002e50| 70 69 6c 69 6e 67 5f 6d | 6f 76 65 3f 20 2e 20 63 |piling_m|ove? . c|
|00002e60| 72 0d 09 09 2e 22 20 62 | 61 63 6b 73 74 6f 70 5f |r...." b|ackstop_|
|00002e70| 43 44 50 20 20 20 20 20 | 20 20 20 22 09 62 61 63 |CDP | ".bac|
|00002e80| 6b 73 74 6f 70 5f 43 44 | 50 20 2e 68 20 63 72 0d |kstop_CD|P .h cr.|
|00002e90| 09 09 2e 22 20 62 61 73 | 69 63 5f 62 6c 6f 63 6b |..." bas|ic_block|
|00002ea0| 5f 73 74 61 72 74 3a 20 | 20 22 09 62 61 73 69 63 |_start: | ".basic|
|00002eb0| 5f 62 6c 6f 63 6b 5f 73 | 74 61 72 74 20 2e 68 20 |_block_s|tart .h |
|00002ec0| 63 72 0d 09 09 2e 22 20 | 6c 61 73 74 52 65 66 43 |cr...." |lastRefC|
|00002ed0| 44 50 20 69 6e 20 64 65 | 73 74 20 20 22 09 67 65 |DP in de|st ".ge|
|00002ee0| 74 3a 20 6c 61 73 74 52 | 65 66 43 44 50 20 2e 68 |t: lastR|efCDP .h|
|00002ef0| 20 63 72 0d 09 74 68 65 | 6e 0d 0d 09 66 61 6c 73 | cr..the|n...fals|
|00002f00| 65 0d 0d 5c 20 4e 6f 77 | 20 77 65 20 64 65 63 69 |e..\ Now| we deci|
|00002f10| 64 65 20 69 66 20 77 65 | 20 63 61 6e 20 68 61 6e |de if we| can han|
|00002f20| 64 6c 65 20 61 20 6d 6f | 76 65 20 62 79 20 6a 75 |dle a mo|ve by ju|
|00002f30| 73 74 20 72 65 63 6f 6d | 70 69 6c 69 6e 67 20 74 |st recom|piling t|
|00002f40| 68 65 20 6f 70 2e 20 20 | 54 68 65 72 65 20 61 72 |he op. |There ar|
|00002f50| 65 0d 5c 20 20 73 65 76 | 65 72 61 6c 20 74 68 69 |e.\ sev|eral thi|
|00002f60| 6e 67 73 20 74 6f 20 63 | 68 65 63 6b 2e 20 20 4e |ngs to c|heck. N|
|00002f70| 6f 74 65 20 77 65 20 64 | 6f 6e 27 74 20 63 68 65 |ote we d|on't che|
|00002f80| 63 6b 20 66 65 74 63 68 | 5f 62 61 63 6b 73 74 6f |ck fetch|_backsto|
|00002f90| 70 2c 20 73 69 6e 63 65 | 20 77 68 65 6e 20 77 65 |p, since| when we|
|00002fa0| 0d 5c 20 20 72 65 63 6f | 6d 70 69 6c 65 20 61 6e |.\ reco|mpile an|
|00002fb0| 20 6f 70 20 77 65 20 64 | 6f 6e 27 74 20 6d 6f 76 | op we d|on't mov|
|00002fc0| 65 20 69 74 2c 20 73 6f | 20 77 65 20 63 61 6e 20 |e it, so| we can |
|00002fd0| 61 73 73 75 6d 65 20 61 | 6e 79 20 66 65 74 63 68 |assume a|ny fetch|
|00002fe0| 65 73 20 61 72 65 20 76 | 61 6c 69 64 0d 5c 20 20 |es are v|alid.\ |
|00002ff0| 69 6e 20 74 68 65 69 72 | 20 65 78 69 73 74 69 6e |in their| existin|
|00003000| 67 20 6c 6f 63 61 74 69 | 6f 6e 2e 20 20 66 65 74 |g locati|on. fet|
|00003010| 63 68 5f 62 61 63 6b 73 | 74 6f 70 20 6f 6e 6c 79 |ch_backs|top only|
|00003020| 20 6c 69 6d 69 74 73 20 | 77 68 65 72 65 20 77 65 | limits |where we|
|00003030| 20 63 61 6e 0d 5c 20 20 | 6d 6f 76 65 20 4e 45 57 | can.\ |move NEW|
|00003040| 20 66 65 74 63 68 65 73 | 20 62 61 63 6b 20 74 6f | fetches| back to|
|00003050| 2e 0d 0d 09 72 65 63 6f | 6d 70 54 65 73 74 3f 0d |....reco|mpTest?.|
|00003060| 09 69 66 0d 09 09 5b 20 | 70 70 63 3f 20 5d 20 5b |.if...[ |ppc? ] [|
|00003070| 69 66 5d 20 64 62 67 72 | 20 5b 74 68 65 6e 5d 0d |if] dbgr| [then].|
|00003080| 09 74 68 65 6e 0d 0d 09 | 6d 6f 76 65 5f 62 79 5f |.then...|move_by_|
|00003090| 72 65 63 6f 6d 70 69 6c | 69 6e 67 3f 09 09 30 45 |recompil|ing?..0E|
|000030a0| 58 49 54 0d 09 09 09 09 | 09 09 5c 20 66 6f 72 20 |XIT.....|..\ for |
|000030b0| 64 65 62 75 67 67 69 6e | 67 20 6f 72 20 77 68 61 |debuggin|g or wha|
|000030c0| 74 65 76 65 72 2c 20 77 | 65 20 63 61 6e 20 74 75 |tever, w|e can tu|
|000030d0| 72 6e 20 74 68 69 73 0d | 09 09 09 09 09 09 5c 20 |rn this.|......\ |
|000030e0| 20 6f 70 74 69 6d 69 7a | 61 74 69 6f 6e 20 6f 66 | optimiz|ation of|
|000030f0| 66 0d 09 0d 09 65 71 5f | 62 6c 6f 63 6b 5f 72 65 |f....eq_|block_re|
|00003100| 63 6f 6d 70 69 6c 69 6e | 67 5f 6d 6f 76 65 3f 20 |compilin|g_move? |
|00003110| 20 3f 45 58 49 54 0d 09 | 09 09 09 09 09 5c 20 69 | ?EXIT..|.....\ i|
|00003120| 66 20 62 61 63 6b 20 65 | 71 75 61 6c 69 7a 69 6e |f back e|qualizin|
|00003130| 67 2c 20 77 65 27 72 65 | 20 64 6f 69 6e 67 20 6c |g, we're| doing l|
|00003140| 6f 77 2d 6c 65 76 65 6c | 20 74 68 69 6e 67 73 0d |ow-level| things.|
|00003150| 09 09 09 09 09 09 5c 20 | 20 77 69 74 68 20 72 65 |......\ | with re|
|00003160| 67 73 20 61 6e 64 20 6d | 75 73 74 6e 27 74 20 74 |gs and m|ustn't t|
|00003170| 72 79 20 74 6f 20 63 68 | 61 6e 67 65 20 61 6e 79 |ry to ch|ange any|
|00003180| 74 68 69 6e 67 2e 0d 0d | 09 67 65 74 3a 20 69 76 |thing...|.get: iv|
|00003190| 61 72 3e 20 73 70 65 63 | 69 61 6c 3f 20 69 6e 20 |ar> spec|ial? in |
|000031a0| 74 68 65 4f 44 20 20 3f | 45 58 49 54 0d 09 09 09 |theOD ?|EXIT....|
|000031b0| 09 09 09 5c 20 63 61 6e | 27 74 20 72 65 63 6f 6d |...\ can|'t recom|
|000031c0| 70 69 6c 65 20 69 66 20 | 74 68 65 20 6f 6c 64 20 |pile if |the old |
|000031d0| 72 65 67 20 69 73 20 61 | 20 6c 6f 63 61 6c 20 6f |reg is a| local o|
|000031e0| 72 0d 09 09 09 09 09 09 | 5c 20 20 62 61 73 65 20 |r.......|\ base |
|000031f0| 72 65 67 20 6f 72 20 77 | 68 61 74 65 76 65 72 20 |reg or w|hatever |
|00003200| 28 77 68 69 63 68 20 63 | 61 6e 27 74 20 6d 6f 76 |(which c|an't mov|
|00003210| 65 29 0d 0d 09 67 65 74 | 3a 20 69 76 61 72 3e 20 |e)...get|: ivar> |
|00003220| 6f 70 54 79 70 65 20 69 | 6e 20 74 68 65 4f 44 20 |opType i|n theOD |
|00003230| 20 6f 74 55 6e 6b 6e 6f | 77 6e 43 6f 64 65 73 20 | otUnkno|wnCodes |
|00003240| 3c 3d 20 20 3f 45 58 49 | 54 0d 09 09 09 09 09 09 |<= ?EXI|T.......|
|00003250| 5c 20 6f 72 20 69 66 20 | 74 68 65 20 6f 6c 64 20 |\ or if |the old |
|00003260| 72 65 67 20 69 73 20 65 | 6d 70 74 79 20 6f 72 20 |reg is e|mpty or |
|00003270| 6f 66 20 75 6e 6b 6e 6f | 77 6e 20 74 79 70 65 0d |of unkno|wn type.|
|00003280| 09 09 09 09 09 09 5c 20 | 20 28 69 2e 65 2e 20 6e |......\ | (i.e. n|
|00003290| 6f 74 68 69 6e 67 20 74 | 6f 20 72 65 63 6f 6d 70 |othing t|o recomp|
|000032a0| 69 6c 65 29 0d 0d 09 67 | 65 74 3a 20 69 76 61 72 |ile)...g|et: ivar|
|000032b0| 3e 20 6f 70 43 44 50 20 | 69 6e 20 74 68 65 4f 44 |> opCDP |in theOD|
|000032c0| 20 20 62 61 73 69 63 5f | 62 6c 6f 63 6b 5f 73 74 | basic_|block_st|
|000032d0| 61 72 74 09 75 3c 20 20 | 3f 45 58 49 54 0d 09 09 |art.u< |?EXIT...|
|000032e0| 09 09 09 09 5c 20 6f 72 | 20 69 66 20 69 74 73 20 |....\ or| if its |
|000032f0| 6f 70 20 77 61 73 6e 27 | 74 20 69 6e 20 74 68 65 |op wasn'|t in the|
|00003300| 20 63 75 72 72 65 6e 74 | 20 62 61 73 69 63 20 62 | current| basic b|
|00003310| 6c 6b 0d 0d 09 67 65 74 | 3a 20 69 76 61 72 3e 20 |lk...get|: ivar> |
|00003320| 6f 70 43 44 50 20 69 6e | 20 74 68 65 4f 44 20 20 |opCDP in| theOD |
|00003330| 20 62 61 63 6b 73 74 6f | 70 5f 43 44 50 09 09 75 | backsto|p_CDP..u|
|00003340| 3c 20 20 3f 45 58 49 54 | 0d 09 09 09 09 09 09 5c |< ?EXIT|.......\|
|00003350| 20 6f 72 20 69 66 20 69 | 74 20 77 6f 75 6c 64 20 | or if i|t would |
|00003360| 62 65 20 70 61 73 74 20 | 74 68 65 20 62 61 63 6b |be past |the back|
|00003370| 73 74 6f 70 0d 09 09 09 | 09 09 09 0d 09 67 65 74 |stop....|.....get|
|00003380| 3a 20 6c 61 73 74 52 65 | 66 43 44 50 20 20 67 65 |: lastRe|fCDP ge|
|00003390| 74 3a 20 69 76 61 72 3e | 20 6f 70 43 44 50 20 69 |t: ivar>| opCDP i|
|000033a0| 6e 20 74 68 65 4f 44 09 | 09 75 3e 20 20 3f 45 58 |n theOD.|.u> ?EX|
|000033b0| 49 54 0d 09 09 09 09 09 | 09 5c 20 6f 72 20 69 66 |IT......|.\ or if|
|000033c0| 20 74 68 65 20 6c 61 73 | 74 20 72 65 66 20 74 6f | the las|t ref to|
|000033d0| 20 74 68 65 20 4e 45 57 | 20 72 65 67 20 77 61 73 | the NEW| reg was|
|000033e0| 20 61 66 74 65 72 20 74 | 68 65 20 6f 70 0d 09 09 | after t|he op...|
|000033f0| 09 09 09 09 5c 20 20 77 | 65 20 77 61 6e 74 20 74 |....\ w|e want t|
|00003400| 6f 20 72 65 63 6f 6d 70 | 69 6c 65 2c 20 73 69 6e |o recomp|ile, sin|
|00003410| 63 65 20 77 65 27 64 20 | 63 6c 6f 62 62 65 72 20 |ce we'd |clobber |
|00003420| 74 68 61 74 20 75 73 65 | 2e 0d 09 09 09 09 09 09 |that use|........|
|00003430| 5c 20 6e 6f 74 65 20 77 | 65 20 75 73 65 20 3e 2c |\ note w|e use >,|
|00003440| 20 6e 6f 74 20 3e 3d 2c | 20 73 69 6e 63 65 20 69 | not >=,| since i|
|00003450| 74 27 73 20 4f 4b 20 69 | 66 20 74 68 65 20 69 6e |t's OK i|f the in|
|00003460| 73 74 72 6e 0d 09 09 09 | 09 09 09 5c 20 20 77 65 |strn....|...\ we|
|00003470| 27 72 65 20 72 65 63 6f | 6d 70 69 6c 69 6e 67 20 |'re reco|mpiling |
|00003480| 75 73 65 73 20 69 74 73 | 20 6f 77 6e 20 72 65 67 |uses its| own reg|
|00003490| 20 61 73 20 61 6e 20 6f | 70 65 72 61 6e 64 2e 0d | as an o|perand..|
|000034a0| 0d 5c 20 69 66 20 77 65 | 20 67 6f 74 20 68 65 72 |.\ if we| got her|
|000034b0| 65 2c 20 69 74 27 73 20 | 4f 4b 20 74 6f 20 72 65 |e, it's |OK to re|
|000034c0| 63 6f 6d 70 69 6c 65 20 | 74 68 65 20 6f 70 21 0d |compile |the op!.|
|000034d0| 0d 09 64 72 6f 70 09 09 | 09 09 5c 20 64 72 6f 70 |..drop..|..\ drop|
|000034e0| 20 66 61 6c 73 65 20 66 | 6c 61 67 0d 0d 09 72 65 | false f|lag...re|
|000034f0| 63 6f 6d 70 54 65 73 74 | 3f 20 69 66 0d 09 09 2e |compTest|? if....|
|00003500| 22 20 6d 6f 76 69 6e 67 | 20 62 79 20 72 65 63 6f |" moving| by reco|
|00003510| 6d 70 69 6c 69 6e 67 20 | 22 20 6f 6c 64 23 20 2e |mpiling |" old# .|
|00003520| 20 2e 22 20 20 74 6f 20 | 22 20 6e 65 77 23 20 2e | ." to |" new# .|
|00003530| 20 63 72 0d 09 74 68 65 | 6e 0d 0d 09 74 68 65 4f | cr..the|n...theO|
|00003540| 44 20 63 6f 70 79 57 69 | 74 68 43 44 50 3a 20 73 |D copyWi|thCDP: s|
|00003550| 65 6c 66 0d 09 67 65 74 | 3a 20 69 76 61 72 3e 20 |elf..get|: ivar> |
|00003560| 72 65 66 63 6e 74 20 69 | 6e 20 74 68 65 4f 44 20 |refcnt i|n theOD |
|00003570| 20 70 75 74 3a 20 72 65 | 66 63 6e 74 0d 09 72 65 | put: re|fcnt..re|
|00003580| 63 6f 6d 70 69 6c 65 3a | 20 73 65 6c 66 0d 0d 09 |compile:| self...|
|00003590| 6f 6c 64 23 20 6e 65 77 | 23 20 61 64 64 72 3a 20 |old# new|# addr: |
|000035a0| 6d 79 52 65 66 20 20 63 | 68 65 63 6b 5f 66 6f 72 |myRef c|heck_for|
|000035b0| 5f 6d 6f 76 65 64 5f 73 | 74 6f 72 65 73 0d 09 0d |_moved_s|tores...|
|000035c0| 09 6f 6c 64 23 20 74 72 | 75 65 20 72 65 67 5f 6d |.old# tr|ue reg_m|
|000035d0| 6f 76 65 64 3a 20 73 65 | 6c 66 0d 09 74 72 75 65 |oved: se|lf..true|
|000035e0| 0d 3b 6d 0d 0d 0d 3a 6d | 20 4d 4f 56 45 52 45 47 |.;m...:m| MOVEREG|
|000035f0| 3a 20 20 7b 20 6f 6c 64 | 23 20 6e 65 77 23 20 75 |: { old|# new# u|
|00003600| 70 64 61 74 65 52 65 66 | 73 3f 20 5c 20 65 78 74 |pdateRef|s? \ ext|
|00003610| 72 61 52 65 66 73 3f 20 | 2d 2d 20 7d 0d 0d 09 64 |raRefs? |-- }...d|
|00003620| 65 62 75 67 3f 20 72 65 | 63 6f 6d 70 54 65 73 74 |ebug? re|compTest|
|00003630| 3f 20 6f 72 20 69 66 0d | 09 09 2e 22 20 6d 6f 76 |? or if.|..." mov|
|00003640| 65 52 65 67 3a 20 63 61 | 6c 6c 65 64 2c 20 74 6f |eReg: ca|lled, to|
|00003650| 20 6d 6f 76 65 20 22 20 | 6f 6c 64 23 20 2e 20 2e | move " |old# . .|
|00003660| 22 20 20 74 6f 20 22 20 | 6e 65 77 23 20 2e 20 63 |" to " |new# . c|
|00003670| 72 0d 09 74 68 65 6e 0d | 0d 09 6e 65 77 23 20 73 |r..then.|..new# s|
|00003680| 65 6c 65 63 74 3a 20 73 | 65 6c 66 0d 09 6f 6c 64 |elect: s|elf..old|
|00003690| 23 20 6e 65 77 23 20 3d | 20 20 3f 45 58 49 54 09 |# new# =| ?EXIT.|
|000036a0| 09 09 5c 20 6a 75 73 74 | 20 69 6e 20 63 61 73 65 |..\ just| in case|
|000036b0| 0d 0d 5c 20 6e 6f 77 20 | 77 65 20 6e 65 65 64 20 |..\ now |we need |
|000036c0| 74 6f 20 63 68 65 63 6b | 20 69 66 20 77 65 20 68 |to check| if we h|
|000036d0| 61 76 65 20 61 6e 79 20 | 65 78 74 72 61 20 72 65 |ave any |extra re|
|000036e0| 66 73 20 74 6f 20 74 68 | 69 73 20 64 65 73 74 20 |fs to th|is dest |
|000036f0| 72 65 67 0d 5c 20 20 6f | 6e 20 63 73 74 6b 2e 20 |reg.\ o|n cstk. |
|00003700| 20 49 66 20 77 65 20 64 | 6f 2c 20 74 68 65 73 65 | If we d|o, these|
|00003710| 20 72 65 66 73 20 6e 65 | 65 64 20 74 68 65 20 6f | refs ne|ed the o|
|00003720| 6c 64 20 76 61 6c 75 65 | 2c 20 73 6f 20 77 65 27 |ld value|, so we'|
|00003730| 6c 6c 20 68 61 76 65 0d | 5c 20 20 74 6f 20 73 61 |ll have.|\ to sa|
|00003740| 76 65 20 74 68 65 20 6f | 6c 64 20 76 61 6c 75 65 |ve the o|ld value|
|00003750| 20 74 6f 20 61 20 6e 65 | 77 20 72 65 67 20 62 65 | to a ne|w reg be|
|00003760| 66 6f 72 65 20 77 65 20 | 63 68 61 6e 67 65 20 74 |fore we |change t|
|00003770| 68 65 20 64 65 73 74 2e | 0d 5c 20 4e 6f 74 65 20 |he dest.|.\ Note |
|00003780| 74 68 61 74 20 77 65 20 | 6d 75 73 74 6e 27 74 20 |that we |mustn't |
|00003790| 64 6f 20 74 68 69 73 20 | 64 75 72 69 6e 67 20 65 |do this |during e|
|000037a0| 71 75 61 6c 69 7a 61 74 | 69 6f 6e 20 77 68 65 6e |qualizat|ion when|
|000037b0| 20 77 65 20 70 72 65 73 | 75 6d 61 62 6c 79 0d 5c | we pres|umably.\|
|000037c0| 20 20 68 61 76 65 20 65 | 76 65 72 79 74 68 69 6e | have e|verythin|
|000037d0| 67 20 75 6e 64 65 72 20 | 63 6f 6e 74 72 6f 6c 20 |g under |control |
|000037e0| 61 6e 64 20 6d 75 73 74 | 6e 27 74 20 74 72 79 20 |and must|n't try |
|000037f0| 74 6f 20 73 65 63 6f 6e | 64 2d 67 75 65 73 73 2e |to secon|d-guess.|
|00003800| 0d 0d 09 65 71 75 61 6c | 69 7a 69 6e 67 3f 0d 09 |...equal|izing?..|
|00003810| 4e 49 46 0d 09 09 66 61 | 6c 73 65 20 2d 3e 20 65 |NIF...fa|lse -> e|
|00003820| 78 74 72 61 52 65 66 73 | 3f 0d 09 09 73 69 7a 65 |xtraRefs|?...size|
|00003830| 3a 20 63 73 74 6b 20 31 | 2b 20 31 0d 09 09 3f 44 |: cstk 1|+ 1...?D|
|00003840| 4f 09 69 20 73 74 6b 3a | 20 63 73 74 6b 0d 09 09 |O.i stk:| cstk...|
|00003850| 09 61 64 64 72 3a 20 6d | 79 52 65 66 20 3d 3f 3a |.addr: m|yRef =?:|
|00003860| 20 63 73 74 6b 0d 09 09 | 09 49 46 0d 09 09 09 09 | cstk...|.IF.....|
|00003870| 64 65 62 75 67 3f 20 69 | 66 0d 09 09 09 09 09 2e |debug? i|f.......|
|00003880| 22 20 77 65 20 68 61 76 | 65 20 61 6e 6f 74 68 65 |" we hav|e anothe|
|00003890| 72 20 72 65 66 20 74 6f | 20 74 68 65 20 64 65 73 |r ref to| the des|
|000038a0| 74 20 72 65 67 2c 20 69 | 6e 20 63 65 6c 6c 20 22 |t reg, i|n cell "|
|000038b0| 20 69 20 2e 20 63 72 0d | 09 09 09 09 09 70 72 69 | i . cr.|.....pri|
|000038c0| 6e 74 61 6c 6c 3a 20 63 | 73 74 6b 0d 09 09 09 09 |ntall: c|stk.....|
|000038d0| 74 68 65 6e 0d 09 09 0d | 09 09 09 09 65 78 74 72 |then....|....extr|
|000038e0| 61 52 65 66 73 3f 0d 09 | 09 09 09 4e 49 46 09 09 |aRefs?..|...NIF..|
|000038f0| 5c 20 66 69 72 73 74 20 | 74 69 6d 65 20 2d 20 67 |\ first |time - g|
|00003900| 65 74 20 74 68 65 20 6e | 65 77 20 72 65 67 0d 09 |et the n|ew reg..|
|00003910| 09 09 09 09 74 72 75 65 | 20 2d 3e 20 65 78 74 72 |....true| -> extr|
|00003920| 61 52 65 66 73 3f 0d 09 | 09 09 09 09 67 65 74 46 |aRefs?..|....getF|
|00003930| 72 65 65 52 65 67 3a 20 | 73 65 6c 66 20 20 64 72 |reeReg: |self dr|
|00003940| 6f 70 0d 09 09 09 09 09 | 6e 65 77 23 20 63 6f 6d |op......|new# com|
|00003950| 70 69 6c 65 5f 72 65 67 | 5f 6d 6f 76 65 3a 20 73 |pile_reg|_move: s|
|00003960| 65 6c 66 0d 09 09 09 09 | 54 48 45 4e 0d 09 09 09 |elf.....|THEN....|
|00003970| 09 61 64 64 72 3a 20 6d | 79 52 65 66 20 20 2d 3e |.addr: m|yRef ->|
|00003980| 3a 20 63 73 74 6b 0d 09 | 09 09 54 48 45 4e 0d 09 |: cstk..|..THEN..|
|00003990| 09 4c 4f 4f 50 0d 09 54 | 48 45 4e 0d 0d 09 6f 6c |.LOOP..T|HEN...ol|
|000039a0| 64 23 20 6e 65 77 23 20 | 6d 6f 76 65 52 65 67 5f |d# new# |moveReg_|
|000039b0| 62 79 5f 72 65 63 6f 6d | 70 69 6c 69 6e 67 3f 3a |by_recom|piling?:|
|000039c0| 20 73 65 6c 66 20 20 3f | 45 58 49 54 0d 09 6e 65 | self ?|EXIT..ne|
|000039d0| 77 23 20 73 65 6c 65 63 | 74 3a 20 73 65 6c 66 0d |w# selec|t: self.|
|000039e0| 09 6f 6c 64 23 20 63 6f | 6d 70 69 6c 65 5f 72 65 |.old# co|mpile_re|
|000039f0| 67 5f 6d 6f 76 65 3a 20 | 73 65 6c 66 0d 09 0d 09 |g_move: |self....|
|00003a00| 64 65 62 75 67 3f 20 72 | 65 63 6f 6d 70 54 65 73 |debug? r|ecompTes|
|00003a10| 74 3f 20 6f 72 20 69 66 | 0d 09 09 2e 22 20 6d 6f |t? or if|...." mo|
|00003a20| 76 65 64 20 62 79 20 63 | 6f 6d 70 69 6c 69 6e 67 |ved by c|ompiling|
|00003a30| 20 61 20 6d 6f 76 65 2c | 20 66 72 6f 6d 20 22 20 | a move,| from " |
|00003a40| 6f 6c 64 23 20 2e 20 2e | 22 20 20 74 6f 20 22 20 |old# . .|" to " |
|00003a50| 6e 65 77 23 20 2e 20 63 | 72 0d 09 74 68 65 6e 0d |new# . c|r..then.|
|00003a60| 0d 09 6f 6c 64 23 20 2d | 31 20 20 61 64 64 72 3a |..old# -|1 addr:|
|00003a70| 20 6d 79 52 65 66 20 20 | 63 68 65 63 6b 5f 66 6f | myRef |check_fo|
|00003a80| 72 5f 6d 6f 76 65 64 5f | 73 74 6f 72 65 73 0d 09 |r_moved_|stores..|
|00003a90| 75 70 64 61 74 65 52 65 | 66 73 3f 0d 09 49 46 09 |updateRe|fs?..IF.|
|00003aa0| 6f 6c 64 23 20 66 61 6c | 73 65 20 72 65 67 5f 6d |old# fal|se reg_m|
|00003ab0| 6f 76 65 64 3a 20 73 65 | 6c 66 0d 09 09 6e 65 77 |oved: se|lf...new|
|00003ac0| 23 20 73 65 6c 65 63 74 | 3a 20 73 65 6c 66 0d 09 |# select|: self..|
|00003ad0| 54 48 45 4e 0d 3b 6d 0d | 0d 0d 5c 20 6e 65 78 74 |THEN.;m.|..\ next|
|00003ae0| 5f 43 44 50 3a 20 72 65 | 74 75 72 6e 73 20 74 68 |_CDP: re|turns th|
|00003af0| 65 20 43 44 50 20 6f 66 | 20 74 68 65 20 66 6f 6c |e CDP of| the fol|
|00003b00| 6c 6f 77 69 6e 67 20 6f | 70 20 2d 2d 20 74 68 69 |lowing o|p -- thi|
|00003b10| 73 20 69 73 20 75 73 65 | 64 20 74 6f 0d 5c 20 20 |s is use|d to.\ |
|00003b20| 63 68 65 63 6b 20 6c 69 | 6d 69 74 73 20 66 6f 72 |check li|mits for|
|00003b30| 20 68 6f 69 73 74 69 6e | 67 2e 20 20 42 75 74 20 | hoistin|g. But |
|00003b40| 69 66 20 6f 75 72 20 43 | 44 50 20 69 73 20 6f 6e |if our C|DP is on|
|00003b50| 65 20 6f 66 20 74 68 65 | 20 73 70 65 63 69 61 6c |e of the| special|
|00003b60| 0d 5c 20 20 6c 6f 77 20 | 76 61 6c 75 65 73 2c 20 |.\ low |values, |
|00003b70| 77 65 20 72 65 74 75 72 | 6e 20 69 74 20 75 6e 63 |we retur|n it unc|
|00003b80| 68 61 6e 67 65 64 2e 0d | 0d 3a 6d 20 6e 65 78 74 |hanged..|.:m next|
|00003b90| 5f 43 44 50 3a 20 20 28 | 20 69 6e 64 65 78 20 2d |_CDP: (| index -|
|00003ba0| 2d 20 6e 65 78 74 5f 43 | 44 50 29 0d 09 63 75 72 |- next_C|DP)..cur|
|00003bb0| 72 65 6e 74 3a 20 73 65 | 6c 66 20 3e 72 0d 09 73 |rent: se|lf >r..s|
|00003bc0| 65 6c 65 63 74 3a 20 73 | 65 6c 66 0d 09 67 65 74 |elect: s|elf..get|
|00003bd0| 3a 20 70 65 72 6d 61 6e | 65 6e 74 3f 0d 09 49 46 |: perman|ent?..IF|
|00003be0| 20 20 31 36 0d 09 45 4c | 53 45 0d 09 09 67 65 74 | 16..EL|SE...get|
|00003bf0| 3a 20 6f 70 43 44 50 20 | 64 75 70 20 31 36 20 75 |: opCDP |dup 16 u|
|00003c00| 3e 0d 09 09 49 46 09 09 | 09 09 09 5c 20 6e 6f 74 |>...IF..|...\ not|
|00003c10| 20 61 20 73 70 65 63 69 | 61 6c 20 76 61 6c 75 65 | a speci|al value|
|00003c20| 20 2d 20 72 65 74 75 72 | 6e 20 74 68 65 20 43 44 | - retur|n the CD|
|00003c30| 50 20 6f 66 20 74 68 65 | 20 6e 65 78 74 20 6f 70 |P of the| next op|
|00003c40| 0d 09 09 09 67 65 74 3a | 20 6c 65 6e 67 74 68 20 |....get:| length |
|00003c50| 2b 20 20 0d 09 09 54 48 | 45 4e 0d 09 54 48 45 4e |+ ...TH|EN..THEN|
|00003c60| 0d 09 72 3e 20 73 65 6c | 65 63 74 3a 20 73 65 6c |..r> sel|ect: sel|
|00003c70| 66 0d 3b 6d 0d 0d 3a 6d | 20 55 53 45 5f 54 48 49 |f.;m..:m| USE_THI|
|00003c80| 53 3a 20 20 28 20 43 44 | 50 5f 74 6f 5f 75 73 65 |S: ( CD|P_to_use|
|00003c90| 20 72 65 67 23 20 2d 2d | 20 29 0d 09 63 75 72 72 | reg# --| )..curr|
|00003ca0| 65 6e 74 3a 20 73 65 6c | 66 20 3e 72 0d 09 73 65 |ent: sel|f >r..se|
|00003cb0| 6c 65 63 74 3a 20 73 65 | 6c 66 20 20 6d 61 72 6b |lect: se|lf mark|
|00003cc0| 5f 75 73 65 3a 20 73 75 | 70 65 72 0d 09 72 3e 20 |_use: su|per..r> |
|00003cd0| 73 65 6c 65 63 74 3a 20 | 73 65 6c 66 0d 3b 6d 0d |select: |self.;m.|
|00003ce0| 0d 3a 6d 20 50 52 49 4e | 54 3a 0d 09 63 72 0d 09 |.:m PRIN|T:..cr..|
|00003cf0| 2e 22 20 63 75 72 72 65 | 6e 74 3a 20 22 20 20 67 |." curre|nt: " g|
|00003d00| 65 74 3a 20 63 75 72 72 | 65 6e 74 20 20 2e 0d 09 |et: curr|ent ...|
|00003d10| 70 72 69 6e 74 3a 20 73 | 75 70 65 72 0d 3b 6d 0d |print: s|uper.;m.|
|00003d20| 0d 3a 6d 20 50 52 49 4e | 54 41 4c 4c 3a 0d 09 63 |.:m PRIN|TALL:..c|
|00003d30| 72 0d 09 2e 22 20 63 75 | 72 72 65 6e 74 3a 20 22 |r..." cu|rrent: "|
|00003d40| 20 20 67 65 74 3a 20 63 | 75 72 72 65 6e 74 20 20 | get: c|urrent |
|00003d50| 64 75 70 20 2e 20 20 63 | 72 0d 09 2e 22 20 6c 61 |dup . c|r..." la|
|00003d60| 73 74 20 61 6c 6c 6f 63 | 61 74 65 64 3a 20 20 22 |st alloc|ated: "|
|00003d70| 20 70 72 69 6e 74 3a 20 | 6c 61 73 74 5f 61 6c 6c | print: |last_all|
|00003d80| 6f 63 61 74 65 64 20 20 | 63 72 0d 0d 09 6c 69 6d |ocated |cr...lim|
|00003d90| 69 74 20 30 0d 09 44 4f | 09 69 20 73 65 6c 65 63 |it 0..DO|.i selec|
|00003da0| 74 3a 20 73 65 6c 66 0d | 09 09 67 65 74 3a 20 6f |t: self.|..get: o|
|00003db0| 70 54 79 70 65 0d 09 09 | 49 46 0d 09 09 09 69 20 |pType...|IF....i |
|00003dc0| 2e 20 20 70 72 69 6e 74 | 3a 20 73 75 70 65 72 20 |. print|: super |
|00003dd0| 20 63 72 0d 09 09 54 48 | 45 4e 0d 09 4c 4f 4f 50 | cr...TH|EN..LOOP|
|00003de0| 0d 09 73 65 6c 65 63 74 | 3a 20 73 65 6c 66 0d 3b |..select|: self.;|
|00003df0| 6d 0d 0d 3a 6d 20 2e 41 | 4c 4c 4f 43 41 54 45 44 |m..:m .A|LLOCATED|
|00003e00| 3a 0d 09 67 65 74 3a 20 | 63 75 72 72 65 6e 74 0d |:..get: |current.|
|00003e10| 09 6c 69 6d 69 74 20 30 | 0d 09 44 4f 09 69 20 73 |.limit 0|..DO.i s|
|00003e20| 65 6c 65 63 74 3a 20 73 | 65 6c 66 20 20 67 65 74 |elect: s|elf get|
|00003e30| 3a 20 72 65 66 43 6e 74 | 0d 09 09 49 46 20 20 69 |: refCnt|...IF i|
|00003e40| 20 2e 20 20 34 20 73 70 | 61 63 65 73 20 2e 22 20 | . 4 sp|aces ." |
|00003e50| 72 65 66 43 6e 74 20 22 | 20 20 67 65 74 3a 20 72 |refCnt "| get: r|
|00003e60| 65 66 43 6e 74 20 2e 20 | 20 63 72 0d 09 09 54 48 |efCnt . | cr...TH|
|00003e70| 45 4e 0d 09 4c 4f 4f 50 | 20 20 63 72 0d 09 73 65 |EN..LOOP| cr..se|
|00003e80| 6c 65 63 74 3a 20 73 65 | 6c 66 0d 3b 6d 0d 0d 3a |lect: se|lf.;m..:|
|00003e90| 6d 20 2e 46 52 45 45 3a | 0d 09 63 72 0d 09 67 65 |m .FREE:|..cr..ge|
|00003ea0| 74 3a 20 63 75 72 72 65 | 6e 74 0d 09 6c 69 6d 69 |t: curre|nt..limi|
|00003eb0| 74 20 30 0d 09 44 4f 09 | 69 20 73 65 6c 65 63 74 |t 0..DO.|i select|
|00003ec0| 3a 20 73 65 6c 66 20 20 | 67 65 74 3a 20 72 65 66 |: self |get: ref|
|00003ed0| 43 6e 74 0d 09 09 4e 49 | 46 20 20 69 20 2e 20 20 |Cnt...NI|F i . |
|00003ee0| 63 72 0d 09 09 54 48 45 | 4e 0d 09 4c 4f 4f 50 0d |cr...THE|N..LOOP.|
|00003ef0| 09 73 65 6c 65 63 74 3a | 20 73 65 6c 66 0d 3b 6d |.select:| self.;m|
|00003f00| 0d 0d 3a 6d 20 49 4e 49 | 54 3a 20 20 7b 20 6d 79 |..:m INI|T: { my|
|00003f10| 52 65 66 54 79 70 65 20 | 6d 79 5f 61 6c 6c 6f 63 |RefType |my_alloc|
|00003f20| 5f 6c 69 6d 69 74 20 31 | 73 74 5f 6e 6f 6e 76 6f |_limit 1|st_nonvo|
|00003f30| 6c 20 2d 2d 20 7d 0d 09 | 31 73 74 5f 6e 6f 6e 76 |l -- }..|1st_nonv|
|00003f40| 6f 6c 20 20 70 75 74 3a | 20 31 73 74 5f 6e 6f 6e |ol put:| 1st_non|
|00003f50| 76 6f 6c 61 74 69 6c 65 | 0d 09 6c 69 6d 69 74 20 |volatile|..limit |
|00003f60| 30 0d 09 44 4f 09 69 20 | 73 65 6c 65 63 74 3a 20 |0..DO.i |select: |
|00003f70| 73 65 6c 66 0d 09 09 6d | 79 52 65 66 54 79 70 65 |self...m|yRefType|
|00003f80| 20 20 3e 72 65 66 54 79 | 70 65 3a 20 6d 79 52 65 | >refTy|pe: myRe|
|00003f90| 66 20 20 69 20 3e 72 65 | 67 3a 20 6d 79 52 65 66 |f i >re|g: myRef|
|00003fa0| 0d 09 4c 4f 4f 50 0d 09 | 6d 79 5f 61 6c 6c 6f 63 |..LOOP..|my_alloc|
|00003fb0| 5f 6c 69 6d 69 74 20 20 | 70 75 74 3a 20 61 6c 6c |_limit |put: all|
|00003fc0| 6f 63 5f 6c 69 6d 69 74 | 0d 3b 6d 0d 0d 3a 6d 20 |oc_limit|.;m..:m |
|00003fd0| 43 4c 41 53 53 49 4e 49 | 54 3a 0d 09 63 6c 65 61 |CLASSINI|T:..clea|
|00003fe0| 72 61 6c 6c 3a 20 73 65 | 6c 66 0d 3b 6d 0d 0d 50 |rall: se|lf.;m..P|
|00003ff0| 50 43 3f 0d 5b 49 46 5d | 09 09 5c 20 6d 61 79 20 |PC?.[IF]|..\ may |
|00004000| 6e 6f 74 20 72 65 61 6c | 6c 79 20 6e 65 65 64 20 |not real|ly need |
|00004010| 74 68 69 73 20 74 6f 20 | 62 65 20 63 6f 6e 64 69 |this to |be condi|
|00004020| 74 69 6f 6e 61 6c 2c 20 | 62 75 74 20 49 27 6d 0d |tional, |but I'm.|
|00004030| 09 09 09 5c 20 20 63 61 | 75 74 69 6f 75 73 2e 2e |...\ ca|utious..|
|00004040| 2e 0d 0d 3a 6d 20 44 45 | 45 50 5f 43 4c 41 53 53 |...:m DE|EP_CLASS|
|00004050| 49 4e 49 54 3a 20 7b 20 | 5c 20 78 78 20 2d 2d 20 |INIT: { |\ xx -- |
|00004060| 7d 09 5c 20 4e 65 65 64 | 20 74 68 69 73 20 66 6f |}.\ Need| this fo|
|00004070| 72 20 73 65 74 74 69 6e | 67 20 75 70 20 77 68 65 |r settin|g up whe|
|00004080| 6e 20 77 65 20 69 6e 69 | 74 69 61 6c 69 7a 65 20 |n we ini|tialize |
|00004090| 6f 66 74 65 72 0d 09 09 | 09 09 09 5c 20 20 74 61 |ofter...|...\ ta|
|000040a0| 72 67 65 74 20 63 6f 6d | 70 69 6c 61 74 69 6f 6e |rget com|pilation|
|000040b0| 2c 20 73 69 6e 63 65 20 | 74 68 65 20 72 65 67 75 |, since |the regu|
|000040c0| 6c 61 72 20 43 4c 41 53 | 53 49 4e 49 54 3a 0d 09 |lar CLAS|SINIT:..|
|000040d0| 09 09 09 09 5c 20 20 64 | 6f 65 73 6e 27 74 20 67 |....\ d|oesn't g|
|000040e0| 65 74 20 64 6f 6e 65 2e | 20 20 4e 65 65 64 20 74 |et done.| Need t|
|000040f0| 6f 20 6f 76 65 72 72 69 | 64 65 2c 20 6f 72 20 69 |o overri|de, or i|
|00004100| 74 20 77 69 6c 6c 0d 09 | 09 09 09 09 5c 20 20 6a |t will..|....\ j|
|00004110| 75 73 74 20 63 61 6c 6c | 20 74 68 65 20 6d 65 74 |ust call| the met|
|00004120| 68 6f 64 20 69 6e 20 74 | 68 65 20 66 69 72 73 74 |hod in t|he first|
|00004130| 20 73 75 70 65 72 63 6c | 61 73 73 20 4f 44 2e 0d | supercl|ass OD..|
|00004140| 0d 09 69 64 78 42 61 73 | 65 20 34 2b 20 20 61 64 |..idxBas|e 4+ ad|
|00004150| 64 72 3a 20 78 64 69 73 | 70 6c 20 20 64 69 73 70 |dr: xdis|pl disp|
|00004160| 6c 21 0d 09 5e 62 61 73 | 65 20 20 63 6c 61 73 73 |l!..^bas|e class|
|00004170| 69 6e 69 74 3a 20 63 6c | 61 73 73 5f 61 73 3e 20 |init: cl|ass_as> |
|00004180| 4f 44 09 5c 20 61 63 74 | 75 61 6c 6c 79 20 63 61 |OD.\ act|ually ca|
|00004190| 6e 20 6f 6d 69 74 20 6f | 6e 63 65 20 69 74 27 73 |n omit o|nce it's|
|000041a0| 20 77 6f 72 6b 69 6e 67 | 0d 09 09 09 09 09 09 09 | working|........|
|000041b0| 09 09 5c 20 20 73 69 6e | 63 65 20 69 76 53 65 74 |..\ sin|ce ivSet|
|000041c0| 75 70 20 63 61 6c 6c 73 | 20 63 6c 61 73 73 69 6e |up calls| classin|
|000041d0| 69 74 3a 20 6f 6e 0d 09 | 09 09 09 09 09 09 09 09 |it: on..|........|
|000041e0| 5c 20 20 41 4c 4c 20 73 | 75 70 65 72 63 6c 61 73 |\ ALL s|uperclas|
|000041f0| 73 65 73 2e 0d 09 28 5e | 62 61 73 65 29 20 2d 3e |ses...(^|base) ->|
|00004200| 20 6e 65 77 4f 62 6a 65 | 63 74 0d 09 5b 27 5d 20 | newObje|ct..['] |
|00004210| 4f 44 73 5f 63 6c 61 73 | 73 20 28 20 64 75 70 20 |ODs_clas|s ( dup |
|00004220| 2d 3e 20 78 78 20 29 20 | 20 69 66 61 20 64 69 73 |-> xx ) | ifa dis|
|00004230| 70 6c 61 63 65 20 20 30 | 20 20 30 0d 09 69 76 53 |place 0| 0..ivS|
|00004240| 65 74 75 70 0d 3b 6d 0d | 0d 5b 54 48 45 4e 5d 0d |etup.;m.|.[THEN].|
|00004250| 0d 3b 63 6c 61 73 73 0d | 0d 0d 33 32 09 4f 44 73 |.;class.|..32.ODs|
|00004260| 5f 63 6c 61 73 73 09 47 | 50 52 73 09 09 09 50 50 |_class.G|PRs...PP|
|00004270| 43 3f 20 6e 6f 74 20 5b | 49 46 5d 20 20 67 70 72 |C? not [|IF] gpr|
|00004280| 52 65 66 20 31 30 20 31 | 33 20 20 69 6e 69 74 3a |Ref 10 1|3 init:|
|00004290| 20 47 50 52 73 20 20 5b | 54 48 45 4e 5d 0d 33 32 | GPRs [|THEN].32|
|000042a0| 09 4f 44 73 5f 63 6c 61 | 73 73 09 46 50 52 73 09 |.ODs_cla|ss.FPRs.|
|000042b0| 09 09 50 50 43 3f 20 6e | 6f 74 20 5b 49 46 5d 20 |..PPC? n|ot [IF] |
|000042c0| 20 66 70 72 52 65 66 20 | 31 33 20 31 34 20 20 69 | fprRef |13 14 i|
|000042d0| 6e 69 74 3a 20 46 50 52 | 73 20 20 5b 54 48 45 4e |nit: FPR|s [THEN|
|000042e0| 5d 0d 20 38 09 4f 44 73 | 5f 63 6c 61 73 73 09 43 |]. 8.ODs|_class.C|
|000042f0| 52 73 09 09 09 09 50 50 | 43 3f 20 6e 6f 74 20 5b |Rs....PP|C? not [|
|00004300| 49 46 5d 20 20 43 52 72 | 65 66 20 20 20 37 20 20 |IF] CRr|ef 7 |
|00004310| 34 20 20 69 6e 69 74 3a | 20 43 52 73 20 20 20 5b |4 init:| CRs [|
|00004320| 54 48 45 4e 5d 0d 0d 33 | 32 09 4f 44 73 5f 63 6c |THEN]..3|2.ODs_cl|
|00004330| 61 73 73 09 53 54 4f 52 | 45 44 5f 47 50 52 73 09 |ass.STOR|ED_GPRs.|
|00004340| 09 50 50 43 3f 20 6e 6f | 74 20 5b 49 46 5d 20 20 |.PPC? no|t [IF] |
|00004350| 67 70 72 52 65 66 20 31 | 30 20 30 20 20 69 6e 69 |gprRef 1|0 0 ini|
|00004360| 74 3a 20 73 74 6f 72 65 | 64 5f 47 50 52 73 20 20 |t: store|d_GPRs |
|00004370| 5b 54 48 45 4e 5d 0d 33 | 32 09 4f 44 73 5f 63 6c |[THEN].3|2.ODs_cl|
|00004380| 61 73 73 09 53 54 4f 52 | 45 44 5f 46 50 52 73 09 |ass.STOR|ED_FPRs.|
|00004390| 09 50 50 43 3f 20 6e 6f | 74 20 5b 49 46 5d 20 20 |.PPC? no|t [IF] |
|000043a0| 66 70 72 52 65 66 20 31 | 30 20 30 20 20 69 6e 69 |fprRef 1|0 0 ini|
|000043b0| 74 3a 20 73 74 6f 72 65 | 64 5f 46 50 52 73 20 20 |t: store|d_FPRs |
|000043c0| 5b 54 48 45 4e 5d 0d 0d | 50 50 43 3f 0d 5b 49 46 |[THEN]..|PPC?.[IF|
|000043d0| 5d 0d 33 32 09 4f 44 73 | 5f 63 6c 61 73 73 09 56 |].32.ODs|_class.V|
|000043e0| 52 73 0d 5b 54 48 45 4e | 5d 0d 0d 5c 20 4e 6f 74 |Rs.[THEN|]..\ Not|
|000043f0| 65 3a 20 77 68 65 6e 20 | 74 61 72 67 65 74 20 63 |e: when |target c|
|00004400| 6f 6d 70 69 6c 69 6e 67 | 20 77 65 20 63 61 6e 27 |ompiling| we can'|
|00004410| 74 20 73 65 6e 64 20 6d | 65 73 73 61 67 65 73 20 |t send m|essages |
|00004420| 61 74 20 63 6f 6d 70 69 | 6c 65 20 74 69 6d 65 2c |at compi|le time,|
|00004430| 20 73 6f 20 77 65 0d 5c | 20 20 63 61 6e 27 74 20 | so we.\| can't |
|00004440| 73 65 6e 64 20 69 6e 69 | 74 3a 2e 20 20 53 6f 20 |send ini|t:. So |
|00004450| 77 65 20 64 6f 20 69 74 | 20 61 74 20 53 45 54 55 |we do it| at SETU|
|00004460| 50 5f 43 47 20 69 6e 20 | 63 67 37 2e 20 20 54 68 |P_CG in |cg7. Th|
|00004470| 65 20 63 6f 64 65 20 74 | 68 65 72 65 20 73 68 6f |e code t|here sho|
|00004480| 75 6c 64 0d 5c 20 20 61 | 67 72 65 65 20 77 69 74 |uld.\ a|gree wit|
|00004490| 68 20 74 68 65 20 61 62 | 6f 76 65 2e 0d 0d 0d 6f |h the ab|ove....o|
|000044a0| 62 6a 50 74 72 09 74 68 | 65 52 65 67 73 20 20 63 |bjPtr.th|eRegs c|
|000044b0| 6c 61 73 73 5f 69 73 20 | 4f 44 73 5f 63 6c 61 73 |lass_is |ODs_clas|
|000044c0| 73 09 09 5c 20 55 73 65 | 64 20 74 6f 20 70 6f 69 |s..\ Use|d to poi|
|000044d0| 6e 74 20 74 6f 20 74 68 | 65 20 61 70 70 72 6f 70 |nt to th|e approp|
|000044e0| 72 69 61 74 65 20 62 61 | 6e 6b 0d 09 09 09 09 09 |riate ba|nk......|
|000044f0| 09 09 09 09 09 5c 20 20 | 6f 66 20 72 65 67 73 20 |.....\ |of regs |
|00004500| 69 6e 20 63 6f 64 65 20 | 77 68 69 63 68 20 63 61 |in code |which ca|
|00004510| 6e 20 61 70 70 6c 79 20 | 74 6f 0d 09 09 09 09 09 |n apply |to......|
|00004520| 09 09 09 09 09 5c 20 20 | 6d 6f 72 65 20 74 68 61 |.....\ |more tha|
|00004530| 6e 20 6f 6e 65 0d 0d 0d | 5c 20 4e 6f 77 20 77 65 |n one...|\ Now we|
|00004540| 20 6e 65 65 64 20 74 6f | 20 70 65 72 6d 61 6e 65 | need to| permane|
|00004550| 6e 74 6c 79 20 61 6c 6c | 6f 63 61 74 65 20 72 65 |ntly all|ocate re|
|00004560| 67 73 20 77 68 69 63 68 | 20 77 65 20 63 61 6e 27 |gs which| we can'|
|00004570| 74 20 75 73 65 20 66 6f | 72 20 0d 5c 20 67 65 6e |t use fo|r .\ gen|
|00004580| 65 72 61 6c 20 6f 70 65 | 72 61 6e 64 73 3a 0d 0d |eral ope|rands:..|
|00004590| 3a 20 41 4c 4c 4f 43 41 | 54 45 5f 52 45 53 45 52 |: ALLOCA|TE_RESER|
|000045a0| 56 45 44 5f 52 45 47 53 | 0d 09 63 75 72 72 65 6e |VED_REGS|..curren|
|000045b0| 74 3a 20 47 50 52 73 20 | 20 63 75 72 72 65 6e 74 |t: GPRs | current|
|000045c0| 3a 20 46 50 52 73 0d 0d | 09 30 09 09 09 09 61 6c |: FPRs..|.0....al|
|000045d0| 6c 6f 63 61 74 65 5f 72 | 65 67 3a 20 47 50 52 73 |locate_r|eg: GPRs|
|000045e0| 20 20 73 70 65 63 69 61 | 6c 3a 20 47 50 52 73 0d | specia|l: GPRs.|
|000045f0| 09 72 58 5f 72 65 67 09 | 09 09 61 6c 6c 6f 63 61 |.rX_reg.|..alloca|
|00004600| 74 65 5f 72 65 67 3a 20 | 47 50 52 73 09 73 70 65 |te_reg: |GPRs.spe|
|00004610| 63 69 61 6c 3a 20 47 50 | 52 73 0d 09 72 59 5f 72 |cial: GP|Rs..rY_r|
|00004620| 65 67 09 09 09 61 6c 6c | 6f 63 61 74 65 5f 72 65 |eg...all|ocate_re|
|00004630| 67 3a 20 47 50 52 73 09 | 73 70 65 63 69 61 6c 3a |g: GPRs.|special:|
|00004640| 20 47 50 52 73 0d 09 72 | 5a 5f 72 65 67 09 09 09 | GPRs..r|Z_reg...|
|00004650| 61 6c 6c 6f 63 61 74 65 | 5f 72 65 67 3a 20 47 50 |allocate|_reg: GP|
|00004660| 52 73 09 73 70 65 63 69 | 61 6c 3a 20 47 50 52 73 |Rs.speci|al: GPRs|
|00004670| 0d 09 53 50 5f 72 65 67 | 09 09 09 61 6c 6c 6f 63 |..SP_reg|...alloc|
|00004680| 61 74 65 5f 72 65 67 3a | 20 47 50 52 73 20 20 73 |ate_reg:| GPRs s|
|00004690| 70 65 63 69 61 6c 3a 20 | 47 50 52 73 0d 09 46 53 |pecial: |GPRs..FS|
|000046a0| 50 5f 72 65 67 09 09 09 | 61 6c 6c 6f 63 61 74 65 |P_reg...|allocate|
|000046b0| 5f 72 65 67 3a 20 47 50 | 52 73 20 20 73 70 65 63 |_reg: GP|Rs spec|
|000046c0| 69 61 6c 3a 20 47 50 52 | 73 0d 09 53 50 5f 72 65 |ial: GPR|s..SP_re|
|000046d0| 67 20 73 79 73 5f 53 50 | 5f 72 65 67 20 3c 3e 0d |g sys_SP|_reg <>.|
|000046e0| 09 49 46 0d 09 09 73 79 | 73 5f 53 50 5f 72 65 67 |.IF...sy|s_SP_reg|
|000046f0| 09 61 6c 6c 6f 63 61 74 | 65 5f 72 65 67 3a 20 47 |.allocat|e_reg: G|
|00004700| 50 52 73 20 20 73 70 65 | 63 69 61 6c 3a 20 47 50 |PRs spe|cial: GP|
|00004710| 52 73 0d 09 54 48 45 4e | 0d 09 52 54 4f 43 5f 72 |Rs..THEN|..RTOC_r|
|00004720| 65 67 09 09 61 6c 6c 6f | 63 61 74 65 5f 72 65 67 |eg..allo|cate_reg|
|00004730| 3a 20 47 50 52 73 20 20 | 70 65 72 6d 61 6e 65 6e |: GPRs |permanen|
|00004740| 74 3a 20 47 50 52 73 0d | 09 6d 61 69 6e 44 61 74 |t: GPRs.|.mainDat|
|00004750| 61 5f 72 65 67 09 61 6c | 6c 6f 63 61 74 65 5f 72 |a_reg.al|locate_r|
|00004760| 65 67 3a 20 47 50 52 73 | 20 20 70 65 72 6d 61 6e |eg: GPRs| perman|
|00004770| 65 6e 74 3a 20 47 50 52 | 73 0d 09 6d 6f 64 44 61 |ent: GPR|s..modDa|
|00004780| 74 61 5f 72 65 67 09 09 | 61 6c 6c 6f 63 61 74 65 |ta_reg..|allocate|
|00004790| 5f 72 65 67 3a 20 47 50 | 52 73 20 20 70 65 72 6d |_reg: GP|Rs perm|
|000047a0| 61 6e 65 6e 74 3a 20 47 | 50 52 73 0d 09 6d 61 69 |anent: G|PRs..mai|
|000047b0| 6e 43 6f 64 65 5f 72 65 | 67 09 61 6c 6c 6f 63 61 |nCode_re|g.alloca|
|000047c0| 74 65 5f 72 65 67 3a 20 | 47 50 52 73 20 20 70 65 |te_reg: |GPRs pe|
|000047d0| 72 6d 61 6e 65 6e 74 3a | 20 47 50 52 73 0d 09 6d |rmanent:| GPRs..m|
|000047e0| 6f 64 43 6f 64 65 5f 72 | 65 67 09 09 61 6c 6c 6f |odCode_r|eg..allo|
|000047f0| 63 61 74 65 5f 72 65 67 | 3a 20 47 50 52 73 20 20 |cate_reg|: GPRs |
|00004800| 70 65 72 6d 61 6e 65 6e | 74 3a 20 47 50 52 73 0d |permanen|t: GPRs.|
|00004810| 09 52 50 5f 72 65 67 09 | 09 09 61 6c 6c 6f 63 61 |.RP_reg.|..alloca|
|00004820| 74 65 5f 72 65 67 3a 20 | 47 50 52 73 20 20 73 70 |te_reg: |GPRs sp|
|00004830| 65 63 69 61 6c 3a 20 47 | 50 52 73 0d 09 6f 62 6a |ecial: G|PRs..obj|
|00004840| 5f 62 61 73 65 5f 72 65 | 67 09 61 6c 6c 6f 63 61 |_base_re|g.alloca|
|00004850| 74 65 5f 72 65 67 3a 20 | 47 50 52 73 20 20 70 65 |te_reg: |GPRs pe|
|00004860| 72 6d 61 6e 65 6e 74 3a | 20 47 50 52 73 0d 0d 09 |rmanent:| GPRs...|
|00004870| 33 32 20 31 73 74 5f 67 | 70 72 5f 6c 6f 63 61 6c |32 1st_g|pr_local|
|00004880| 0d 09 44 4f 09 69 20 73 | 65 6c 65 63 74 3a 20 47 |..DO.i s|elect: G|
|00004890| 50 52 73 20 20 31 20 70 | 75 74 3a 20 69 76 61 72 |PRs 1 p|ut: ivar|
|000048a0| 3e 20 72 65 66 43 6e 74 | 20 69 6e 20 47 50 52 73 |> refCnt| in GPRs|
|000048b0| 20 20 73 70 65 63 69 61 | 6c 3a 20 47 50 52 73 0d | specia|l: GPRs.|
|000048c0| 09 4c 4f 4f 50 0d 0d 5c | 20 6e 6f 77 20 74 68 65 |.LOOP..\| now the|
|000048d0| 20 46 50 52 73 0d 09 30 | 09 09 09 09 61 6c 6c 6f | FPRs..0|....allo|
|000048e0| 63 61 74 65 5f 72 65 67 | 3a 20 46 50 52 73 20 20 |cate_reg|: FPRs |
|000048f0| 73 70 65 63 69 61 6c 3a | 20 46 50 52 73 0d 0d 09 |special:| FPRs...|
|00004900| 33 32 20 31 73 74 5f 66 | 70 72 5f 6c 6f 63 61 6c |32 1st_f|pr_local|
|00004910| 0d 09 44 4f 09 69 20 73 | 65 6c 65 63 74 3a 20 46 |..DO.i s|elect: F|
|00004920| 50 52 73 20 20 31 20 70 | 75 74 3a 20 69 76 61 72 |PRs 1 p|ut: ivar|
|00004930| 3e 20 72 65 66 43 6e 74 | 20 69 6e 20 46 50 52 73 |> refCnt| in FPRs|
|00004940| 20 20 73 70 65 63 69 61 | 6c 3a 20 46 50 52 73 0d | specia|l: FPRs.|
|00004950| 09 4c 4f 4f 50 0d 09 0d | 09 73 65 6c 65 63 74 3a |.LOOP...|.select:|
|00004960| 20 46 50 52 73 20 20 73 | 65 6c 65 63 74 3a 20 47 | FPRs s|elect: G|
|00004970| 50 52 73 0d 3b 0d 0d 0d | 50 50 43 3f 20 6e 6f 74 |PRs.;...|PPC? not|
|00004980| 20 5b 49 46 5d 20 20 61 | 6c 6c 6f 63 61 74 65 5f | [IF] a|llocate_|
|00004990| 72 65 73 65 72 76 65 64 | 5f 72 65 67 73 20 20 5b |reserved|_regs [|
|000049a0| 54 48 45 4e 5d 0d 0d 0d | 5c 20 57 65 20 75 73 65 |THEN]...|\ We use|
|000049b0| 20 74 68 65 73 65 20 6f | 62 6a 65 63 74 73 20 74 | these o|bjects t|
|000049c0| 6f 20 6b 65 65 70 20 74 | 72 61 63 6b 20 6f 66 20 |o keep t|rack of |
|000049d0| 74 68 65 20 6f 70 65 72 | 61 6e 64 73 20 61 6e 64 |the oper|ands and|
|000049e0| 20 72 65 73 75 6c 74 73 | 20 6f 66 20 74 68 65 0d | results| of the.|
|000049f0| 5c 20 6f 70 65 72 61 74 | 69 6f 6e 20 77 65 27 72 |\ operat|ion we'r|
|00004a00| 65 20 63 75 72 72 65 6e | 74 6c 79 20 63 6f 6d 70 |e curren|tly comp|
|00004a10| 69 6c 69 6e 67 3a 0d 0d | 09 72 65 66 65 72 65 6e |iling:..|.referen|
|00004a20| 63 65 09 4f 50 4e 44 31 | 0d 09 72 65 66 65 72 65 |ce.OPND1|..refere|
|00004a30| 6e 63 65 09 4f 50 4e 44 | 32 0d 09 72 65 66 65 72 |nce.OPND|2..refer|
|00004a40| 65 6e 63 65 09 4f 50 4e | 44 33 0d 09 72 65 66 65 |ence.OPN|D3..refe|
|00004a50| 72 65 6e 63 65 09 4f 50 | 4e 44 34 0d 09 0d 09 72 |rence.OP|ND4....r|
|00004a60| 65 66 65 72 65 6e 63 65 | 09 52 45 53 31 0d 09 72 |eference|.RES1..r|
|00004a70| 65 66 65 72 65 6e 63 65 | 09 52 45 53 32 0d 09 72 |eference|.RES2..r|
|00004a80| 65 66 65 72 65 6e 63 65 | 09 52 45 53 33 0d 09 0d |eference|.RES3...|
|00004a90| 09 72 65 66 65 72 65 6e | 63 65 09 54 4d 50 52 45 |.referen|ce.TMPRE|
|00004aa0| 46 0d 0d 09 30 09 76 61 | 6c 75 65 09 45 58 49 54 |F...0.va|lue.EXIT|
|00004ab0| 5f 43 48 41 49 4e 0d 09 | 0d 0d 3a 66 20 41 4c 4c |_CHAIN..|..:f ALL|
|00004ac0| 4f 43 41 54 45 5f 47 50 | 52 09 61 6c 6c 6f 63 61 |OCATE_GP|R.alloca|
|00004ad0| 74 65 5f 72 65 67 3a 20 | 47 50 52 73 09 3b 66 0d |te_reg: |GPRs.;f.|
|00004ae0| 3a 66 20 41 4c 4c 4f 43 | 41 54 45 5f 46 50 52 09 |:f ALLOC|ATE_FPR.|
|00004af0| 61 6c 6c 6f 63 61 74 65 | 5f 72 65 67 3a 20 46 50 |allocate|_reg: FP|
|00004b00| 52 73 09 3b 66 0d 3a 66 | 20 41 4c 4c 4f 43 41 54 |Rs.;f.:f| ALLOCAT|
|00004b10| 45 5f 43 52 09 61 6c 6c | 6f 63 61 74 65 5f 72 65 |E_CR.all|ocate_re|
|00004b20| 67 3a 20 43 52 73 09 3b | 66 0d 0d 3a 66 20 46 52 |g: CRs.;|f..:f FR|
|00004b30| 45 45 5f 47 50 52 09 09 | 66 72 65 65 5f 72 65 67 |EE_GPR..|free_reg|
|00004b40| 3a 20 47 50 52 73 09 3b | 66 0d 3a 66 20 46 52 45 |: GPRs.;|f.:f FRE|
|00004b50| 45 5f 46 50 52 09 09 66 | 72 65 65 5f 72 65 67 3a |E_FPR..f|ree_reg:|
|00004b60| 20 46 50 52 73 09 3b 66 | 0d 3a 66 20 46 52 45 45 | FPRs.;f|.:f FREE|
|00004b70| 5f 43 52 09 09 66 72 65 | 65 5f 72 65 67 3a 20 43 |_CR..fre|e_reg: C|
|00004b80| 52 73 09 3b 66 0d 0d 3a | 66 20 44 45 4c 5f 47 50 |Rs.;f..:|f DEL_GP|
|00004b90| 52 09 09 3f 64 65 6c 65 | 74 65 5f 72 65 67 3a 20 |R..?dele|te_reg: |
|00004ba0| 47 50 52 73 09 3b 66 0d | 3a 66 20 44 45 4c 5f 46 |GPRs.;f.|:f DEL_F|
|00004bb0| 50 52 09 09 3f 64 65 6c | 65 74 65 5f 72 65 67 3a |PR..?del|ete_reg:|
|00004bc0| 20 46 50 52 73 09 3b 66 | 0d 3a 66 20 44 45 4c 5f | FPRs.;f|.:f DEL_|
|00004bd0| 43 52 09 09 3f 64 65 6c | 65 74 65 5f 72 65 67 3a |CR..?del|ete_reg:|
|00004be0| 20 43 52 73 09 3b 66 0d | 0d 3a 66 20 3f 43 4c 45 | CRs.;f.|.:f ?CLE|
|00004bf0| 41 52 5f 47 50 52 09 67 | 65 74 3a 20 69 76 61 72 |AR_GPR.g|et: ivar|
|00004c00| 3e 20 72 65 66 43 6e 74 | 20 69 6e 20 47 50 52 73 |> refCnt| in GPRs|
|00004c10| 0d 09 09 09 09 4e 49 46 | 20 20 63 6c 65 61 72 3a |.....NIF| clear:|
|00004c20| 20 69 76 61 72 3e 20 6f | 70 54 79 70 65 20 69 6e | ivar> o|pType in|
|00004c30| 20 47 50 52 73 20 20 31 | 20 2b 2b 3e 20 23 67 70 | GPRs 1| ++> #gp|
|00004c40| 72 73 5f 63 6c 65 61 72 | 65 64 20 20 54 48 45 4e |rs_clear|ed THEN|
|00004c50| 0d 3b 66 0d 0d 3a 66 20 | 3f 43 4c 45 41 52 5f 46 |.;f..:f |?CLEAR_F|
|00004c60| 50 52 09 67 65 74 3a 20 | 69 76 61 72 3e 20 72 65 |PR.get: |ivar> re|
|00004c70| 66 43 6e 74 20 69 6e 20 | 46 50 52 73 0d 09 09 09 |fCnt in |FPRs....|
|00004c80| 09 4e 49 46 20 20 63 6c | 65 61 72 3a 20 69 76 61 |.NIF cl|ear: iva|
|00004c90| 72 3e 20 6f 70 54 79 70 | 65 20 69 6e 20 46 50 52 |r> opTyp|e in FPR|
|00004ca0| 73 20 20 54 48 45 4e 0d | 3b 66 0d 0d 3a 66 20 3f |s THEN.|;f..:f ?|
|00004cb0| 43 4c 45 41 52 5f 43 52 | 09 67 65 74 3a 20 69 76 |CLEAR_CR|.get: iv|
|00004cc0| 61 72 3e 20 72 65 66 43 | 6e 74 20 69 6e 20 43 52 |ar> refC|nt in CR|
|00004cd0| 73 0d 09 09 09 09 4e 49 | 46 20 20 63 6c 65 61 72 |s.....NI|F clear|
|00004ce0| 3a 20 69 76 61 72 3e 20 | 6f 70 54 79 70 65 20 69 |: ivar> |opType i|
|00004cf0| 6e 20 43 52 73 20 20 54 | 48 45 4e 0d 3b 66 0d 0d |n CRs T|HEN.;f..|
|00004d00| 3a 66 20 55 53 45 5f 47 | 50 52 09 09 75 73 65 5f |:f USE_G|PR..use_|
|00004d10| 74 68 69 73 3a 20 47 50 | 52 73 20 20 3b 66 0d 3a |this: GP|Rs ;f.:|
|00004d20| 66 20 55 53 45 5f 46 50 | 52 09 09 75 73 65 5f 74 |f USE_FP|R..use_t|
|00004d30| 68 69 73 3a 20 46 50 52 | 73 20 20 3b 66 0d 3a 66 |his: FPR|s ;f.:f|
|00004d40| 20 55 53 45 5f 43 52 09 | 09 75 73 65 5f 74 68 69 | USE_CR.|.use_thi|
|00004d50| 73 3a 20 43 52 73 20 20 | 20 3b 66 0d 0d 3a 66 20 |s: CRs | ;f..:f |
|00004d60| 53 45 54 5f 43 52 30 09 | 09 30 20 73 65 6c 65 63 |SET_CR0.|.0 selec|
|00004d70| 74 3a 20 43 52 73 0d 09 | 09 09 09 70 75 74 3a 20 |t: CRs..|...put: |
|00004d80| 69 76 61 72 3e 20 6f 70 | 43 44 50 20 69 6e 20 43 |ivar> op|CDP in C|
|00004d90| 52 73 0d 09 09 09 09 70 | 75 74 3a 20 69 76 61 72 |Rs.....p|ut: ivar|
|00004da0| 3e 20 6f 70 54 79 70 65 | 20 69 6e 20 43 52 73 20 |> opType| in CRs |
|00004db0| 20 3b 66 0d 0d 3a 66 20 | 47 50 52 5f 6e 65 78 74 | ;f..:f |GPR_next|
|00004dc0| 5f 43 44 50 09 09 6e 65 | 78 74 5f 43 44 50 3a 20 |_CDP..ne|xt_CDP: |
|00004dd0| 47 50 52 73 20 20 3b 66 | 0d 3a 66 20 46 50 52 5f |GPRs ;f|.:f FPR_|
|00004de0| 6e 65 78 74 5f 43 44 50 | 09 09 6e 65 78 74 5f 43 |next_CDP|..next_C|
|00004df0| 44 50 3a 20 46 50 52 73 | 20 20 3b 66 0d 3a 66 20 |DP: FPRs| ;f.:f |
|00004e00| 43 52 5f 6e 65 78 74 5f | 43 44 50 09 09 6e 65 78 |CR_next_|CDP..nex|
|00004e10| 74 5f 43 44 50 3a 20 43 | 52 73 20 20 3b 66 0d 0d |t_CDP: C|Rs ;f..|
|00004e20| 0d 0d 28 2a 09 55 50 44 | 41 54 45 5f 52 45 46 43 |..(*.UPD|ATE_REFC|
|00004e30| 4e 54 53 20 63 68 65 63 | 6b 73 20 63 73 74 6b 20 |NTS chec|ks cstk |
|00004e40| 61 6e 64 20 65 6e 73 75 | 72 65 73 20 74 68 61 74 |and ensu|res that|
|00004e50| 20 74 68 65 20 72 65 66 | 63 6e 74 20 66 69 65 6c | the ref|cnt fiel|
|00004e60| 64 73 20 69 6e 20 61 6c | 6c 20 72 65 67 73 0d 09 |ds in al|l regs..|
|00004e70| 61 72 65 20 63 6f 72 72 | 65 63 74 2e 20 20 42 61 |are corr|ect. Ba|
|00004e80| 73 69 63 20 62 6c 6f 63 | 6b 20 62 6f 75 6e 64 61 |sic bloc|k bounda|
|00004e90| 72 69 65 73 20 6f 72 20 | 75 70 64 61 74 69 6e 67 |ries or |updating|
|00004ea0| 20 72 65 66 73 20 6d 61 | 79 20 67 65 74 20 74 68 | refs ma|y get th|
|00004eb0| 69 6e 67 73 20 6f 75 74 | 0d 09 6f 66 20 6b 69 6c |ings out|..of kil|
|00004ec0| 74 65 72 2c 20 73 6f 20 | 74 68 69 73 20 65 6e 73 |ter, so |this ens|
|00004ed0| 75 72 65 73 20 65 76 65 | 72 79 74 68 69 6e 67 27 |ures eve|rything'|
|00004ee0| 73 20 62 61 63 6b 20 74 | 6f 20 77 68 61 74 20 69 |s back t|o what i|
|00004ef0| 74 20 73 68 6f 75 6c 64 | 20 62 65 2e 0d 2a 29 0d |t should| be..*).|
|00004f00| 0d 3a 20 55 50 44 41 54 | 45 5f 52 45 46 43 4e 54 |.: UPDAT|E_REFCNT|
|00004f10| 53 0d 09 63 6c 65 61 72 | 5f 72 65 66 43 6e 74 73 |S..clear|_refCnts|
|00004f20| 3a 20 47 50 52 73 0d 09 | 63 6c 65 61 72 5f 72 65 |: GPRs..|clear_re|
|00004f30| 66 43 6e 74 73 3a 20 46 | 50 52 73 0d 09 63 6c 65 |fCnts: F|PRs..cle|
|00004f40| 61 72 5f 72 65 66 43 6e | 74 73 3a 20 43 52 73 0d |ar_refCn|ts: CRs.|
|00004f50| 0d 5c 20 64 6f 6e 27 74 | 20 77 6f 72 72 79 20 61 |.\ don't| worry a|
|00004f60| 62 6f 75 74 20 72 65 66 | 43 6e 74 73 20 69 6e 20 |bout ref|Cnts in |
|00004f70| 73 74 6f 72 65 64 5f 47 | 50 52 73 0d 0d 09 73 69 |stored_G|PRs...si|
|00004f80| 7a 65 3a 20 63 73 74 6b | 20 31 2b 20 31 0d 09 3f |ze: cstk| 1+ 1..?|
|00004f90| 44 4f 09 69 20 73 74 6b | 3a 20 63 73 74 6b 20 20 |DO.i stk|: cstk |
|00004fa0| 61 6c 6c 6f 63 61 74 65 | 3a 20 63 73 74 6b 0d 09 |allocate|: cstk..|
|00004fb0| 4c 4f 4f 50 0d 09 0d 09 | 73 69 7a 65 3a 20 66 63 |LOOP....|size: fc|
|00004fc0| 73 74 6b 20 31 2b 20 31 | 0d 09 3f 44 4f 09 69 20 |stk 1+ 1|..?DO.i |
|00004fd0| 73 74 6b 3a 20 66 63 73 | 74 6b 20 20 61 6c 6c 6f |stk: fcs|tk allo|
|00004fe0| 63 61 74 65 3a 20 66 63 | 73 74 6b 0d 09 4c 4f 4f |cate: fc|stk..LOO|
|00004ff0| 50 0d 0d 09 61 6c 6c 6f | 63 61 74 65 5f 72 65 73 |P...allo|cate_res|
|00005000| 65 72 76 65 64 5f 72 65 | 67 73 0d 3b 0d 0d 0d 3a |erved_re|gs.;...:|
|00005010| 20 4d 41 4b 45 5f 41 4c | 54 45 52 45 44 5f 52 45 | MAKE_AL|TERED_RE|
|00005020| 47 53 5f 55 4e 4b 4e 4f | 57 4e 0d 09 5b 20 64 65 |GS_UNKNO|WN..[ de|
|00005030| 62 75 67 3f 20 5d 20 5b | 69 66 5d 0d 09 09 2e 22 |bug? ] [|if]...."|
|00005040| 20 6d 61 6b 65 5f 61 6c | 74 65 72 65 64 5f 72 65 | make_al|tered_re|
|00005050| 67 73 5f 75 6e 6b 6e 6f | 77 6e 20 63 61 6c 6c 65 |gs_unkno|wn calle|
|00005060| 64 22 20 63 72 0d 09 5b | 74 68 65 6e 5d 0d 09 6d |d" cr..[|then]..m|
|00005070| 61 6b 65 5f 61 6c 74 65 | 72 65 64 5f 72 65 67 73 |ake_alte|red_regs|
|00005080| 5f 75 6e 6b 6e 6f 77 6e | 3a 20 47 50 52 73 0d 09 |_unknown|: GPRs..|
|00005090| 6d 61 6b 65 5f 61 6c 74 | 65 72 65 64 5f 72 65 67 |make_alt|ered_reg|
|000050a0| 73 5f 75 6e 6b 6e 6f 77 | 6e 3a 20 46 50 52 73 0d |s_unknow|n: FPRs.|
|000050b0| 09 6d 61 6b 65 5f 61 6c | 74 65 72 65 64 5f 72 65 |.make_al|tered_re|
|000050c0| 67 73 5f 75 6e 6b 6e 6f | 77 6e 3a 20 43 52 73 0d |gs_unkno|wn: CRs.|
|000050d0| 09 6d 61 6b 65 5f 61 6c | 74 65 72 65 64 5f 72 65 |.make_al|tered_re|
|000050e0| 67 73 5f 75 6e 6b 6e 6f | 77 6e 3a 20 73 74 6f 72 |gs_unkno|wn: stor|
|000050f0| 65 64 5f 47 50 52 73 0d | 3b 0d 0d 0d 6f 62 6a 50 |ed_GPRs.|;...objP|
|00005100| 74 72 09 6d 61 74 63 68 | 5f 72 65 67 73 09 09 63 |tr.match|_regs..c|
|00005110| 6c 61 73 73 5f 69 73 20 | 20 4f 44 73 5f 63 6c 61 |lass_is | ODs_cla|
|00005120| 73 73 0d 6f 62 6a 50 74 | 72 20 20 73 74 6f 72 65 |ss.objPt|r store|
|00005130| 64 5f 72 65 67 73 09 09 | 63 6c 61 73 73 5f 69 73 |d_regs..|class_is|
|00005140| 20 20 4f 44 73 5f 63 6c | 61 73 73 0d 0d 3a 20 6d | ODs_cl|ass..: m|
|00005150| 61 74 63 68 5f 73 74 6f | 72 65 73 3f 20 20 7b 20 |atch_sto|res? { |
|00005160| 5e 72 65 67 73 20 5e 73 | 74 6f 72 65 64 5f 72 65 |^regs ^s|tored_re|
|00005170| 67 73 20 5e 4f 44 20 73 | 74 6f 72 65 2d 63 6f 64 |gs ^OD s|tore-cod|
|00005180| 65 20 63 61 6e 42 65 53 | 70 65 63 69 61 6c 3f 20 |e canBeS|pecial? |
|00005190| 0d 09 09 09 09 09 5c 20 | 73 76 5f 6f 70 54 79 70 |......\ |sv_opTyp|
|000051a0| 65 20 2d 2d 20 5e 4f 44 | 27 20 74 72 75 65 20 7c |e -- ^OD|' true ||
|000051b0| 20 2d 2d 20 66 61 6c 73 | 65 20 7d 0d 0d 09 5e 72 | -- fals|e }...^r|
|000051c0| 65 67 73 20 2d 3e 20 6d | 61 74 63 68 5f 72 65 67 |egs -> m|atch_reg|
|000051d0| 73 20 20 5e 73 74 6f 72 | 65 64 5f 72 65 67 73 20 |s ^stor|ed_regs |
|000051e0| 2d 3e 20 73 74 6f 72 65 | 64 5f 72 65 67 73 0d 0d |-> store|d_regs..|
|000051f0| 09 64 65 62 75 67 3f 20 | 69 66 0d 09 09 2e 22 20 |.debug? |if...." |
|00005200| 6d 61 74 63 68 3f 20 64 | 69 64 6e 27 74 20 6d 61 |match? d|idn't ma|
|00005210| 74 63 68 20 66 65 74 63 | 68 20 6f 6e 20 72 65 67 |tch fetc|h on reg|
|00005220| 73 22 20 63 72 0d 09 09 | 2e 22 20 2d 20 6e 6f 77 |s" cr...|." - now|
|00005230| 20 61 74 74 65 6d 70 74 | 69 6e 67 20 74 6f 20 6d | attempt|ing to m|
|00005240| 61 74 63 68 20 77 69 74 | 68 20 73 74 6f 72 65 64 |atch wit|h stored|
|00005250| 20 72 65 67 73 3a 22 20 | 63 72 0d 09 09 70 72 69 | regs:" |cr...pri|
|00005260| 6e 74 3a 20 5b 20 5e 4f | 44 20 5d 0d 09 09 63 72 |nt: [ ^O|D ]...cr|
|00005270| 20 2e 22 20 73 74 6f 72 | 65 64 20 72 65 67 73 3a | ." stor|ed regs:|
|00005280| 20 22 20 63 72 0d 09 09 | 70 72 69 6e 74 61 6c 6c | " cr...|printall|
|00005290| 3a 20 73 74 6f 72 65 64 | 5f 72 65 67 73 20 63 72 |: stored|_regs cr|
|000052a0| 0d 09 74 68 65 6e 0d 0d | 09 5e 4f 44 20 20 67 65 |..then..|.^OD ge|
|000052b0| 74 3a 20 69 76 61 72 3e | 20 6f 70 54 79 70 65 20 |t: ivar>| opType |
|000052c0| 69 6e 20 63 6c 61 73 73 | 5f 61 73 3e 20 4f 44 20 |in class|_as> OD |
|000052d0| 20 2d 3e 20 73 76 5f 6f | 70 54 79 70 65 0d 09 73 | -> sv_o|pType..s|
|000052e0| 74 6f 72 65 2d 63 6f 64 | 65 20 20 5e 4f 44 20 70 |tore-cod|e ^OD p|
|000052f0| 75 74 3a 20 69 76 61 72 | 3e 20 6f 70 54 79 70 65 |ut: ivar|> opType|
|00005300| 20 69 6e 20 63 6c 61 73 | 73 5f 61 73 3e 20 4f 44 | in clas|s_as> OD|
|00005310| 0d 09 0d 09 5e 4f 44 20 | 20 63 61 6e 42 65 53 70 |....^OD | canBeSp|
|00005320| 65 63 69 61 6c 3f 20 20 | 6d 61 74 63 68 3f 3a 20 |ecial? |match?: |
|00005330| 73 74 6f 72 65 64 5f 72 | 65 67 73 0d 09 0d 09 73 |stored_r|egs....s|
|00005340| 76 5f 6f 70 54 79 70 65 | 20 20 5e 4f 44 20 70 75 |v_opType| ^OD pu|
|00005350| 74 3a 20 69 76 61 72 3e | 20 6f 70 54 79 70 65 20 |t: ivar>| opType |
|00005360| 69 6e 20 63 6c 61 73 73 | 5f 61 73 3e 20 4f 44 09 |in class|_as> OD.|
|00005370| 09 5c 20 72 65 73 74 6f | 72 65 20 69 74 0d 0d 09 |.\ resto|re it...|
|00005380| 64 65 62 75 67 3f 20 69 | 66 0d 09 09 64 75 70 20 |debug? i|f...dup |
|00005390| 69 66 20 2e 22 20 6d 61 | 74 63 68 65 64 20 6f 6e |if ." ma|tched on|
|000053a0| 20 73 74 6f 72 65 64 20 | 72 65 67 73 22 20 65 6c | stored |regs" el|
|000053b0| 73 65 20 2e 22 20 64 69 | 64 6e 27 74 20 6d 61 74 |se ." di|dn't mat|
|000053c0| 63 68 20 73 74 6f 72 65 | 64 20 72 65 67 73 22 20 |ch store|d regs" |
|000053d0| 74 68 65 6e 20 63 72 20 | 63 72 0d 09 74 68 65 6e |then cr |cr..then|
|000053e0| 0d 0d 09 4e 49 46 09 66 | 61 6c 73 65 09 45 58 49 |...NIF.f|alse.EXI|
|000053f0| 54 20 20 54 48 45 4e 0d | 0d 5c 20 77 65 27 76 65 |T THEN.|.\ we've|
|00005400| 20 6d 61 74 63 68 65 64 | 20 6f 6e 20 61 20 73 74 | matched| on a st|
|00005410| 6f 72 65 64 20 72 65 67 | 2e 20 20 57 65 20 75 73 |ored reg|. We us|
|00005420| 65 20 69 74 2c 20 62 75 | 74 20 63 68 61 6e 67 65 |e it, bu|t change|
|00005430| 20 69 74 73 20 74 79 70 | 65 20 0d 5c 20 20 69 6e | its typ|e .\ in|
|00005440| 20 47 50 52 73 2f 46 50 | 52 73 20 74 6f 20 6f 74 | GPRs/FP|Rs to ot|
|00005450| 55 6e 6b 6e 6f 77 6e 20 | 73 6f 20 77 65 20 63 61 |Unknown |so we ca|
|00005460| 6e 27 74 20 63 68 61 6e | 67 65 20 69 74 20 61 67 |n't chan|ge it ag|
|00005470| 61 69 6e 2e 20 20 41 6e | 79 20 61 74 74 65 6d 70 |ain. An|y attemp|
|00005480| 74 0d 5c 20 20 74 6f 20 | 72 65 63 6f 6d 70 69 6c |t.\ to |recompil|
|00005490| 65 20 69 74 2c 20 73 61 | 79 2c 20 77 6f 75 6c 64 |e it, sa|y, would|
|000054a0| 20 63 6c 6f 62 62 65 72 | 20 74 68 65 20 73 74 6f | clobber| the sto|
|000054b0| 72 65 20 28 74 68 65 20 | 76 6f 69 63 65 20 6f 66 |re (the |voice of|
|000054c0| 0d 5c 20 20 65 78 70 65 | 72 69 65 6e 63 65 29 2e |.\ expe|rience).|
|000054d0| 0d 0d 09 63 75 72 72 65 | 6e 74 3a 20 73 74 6f 72 |...curre|nt: stor|
|000054e0| 65 64 5f 72 65 67 73 20 | 20 73 65 6c 65 63 74 3a |ed_regs | select:|
|000054f0| 20 6d 61 74 63 68 5f 72 | 65 67 73 0d 0d 09 61 64 | match_r|egs...ad|
|00005500| 64 72 3a 20 73 74 6f 72 | 65 64 5f 72 65 67 73 20 |dr: stor|ed_regs |
|00005510| 20 63 6f 70 79 4f 44 3a | 20 6d 61 74 63 68 5f 72 | copyOD:| match_r|
|00005520| 65 67 73 0d 09 6f 74 55 | 6e 6b 6e 6f 77 6e 20 20 |egs..otU|nknown |
|00005530| 70 75 74 3a 20 69 76 61 | 72 3e 20 6f 70 54 79 70 |put: iva|r> opTyp|
|00005540| 65 20 69 6e 20 6d 61 74 | 63 68 5f 72 65 67 73 0d |e in mat|ch_regs.|
|00005550| 09 64 65 62 75 67 3f 20 | 69 66 0d 09 09 2e 22 20 |.debug? |if...." |
|00005560| 63 68 61 6e 67 65 64 20 | 74 79 70 65 20 69 6e 20 |changed |type in |
|00005570| 6d 61 74 63 68 5f 72 65 | 67 73 20 74 6f 20 6f 74 |match_re|gs to ot|
|00005580| 55 6e 6b 6e 6f 77 6e 3a | 22 0d 09 09 70 72 69 6e |Unknown:|"...prin|
|00005590| 74 3a 20 6d 61 74 63 68 | 5f 72 65 67 73 0d 09 74 |t: match|_regs..t|
|000055a0| 68 65 6e 0d 09 43 44 50 | 20 20 70 75 74 3a 20 69 |hen..CDP| put: i|
|000055b0| 76 61 72 3e 20 6c 61 73 | 74 52 65 66 43 44 50 20 |var> las|tRefCDP |
|000055c0| 69 6e 20 6d 61 74 63 68 | 5f 72 65 67 73 0d 09 62 |in match|_regs..b|
|000055d0| 69 67 23 20 70 75 74 3a | 20 69 76 61 72 3e 20 76 |ig# put:| ivar> v|
|000055e0| 61 6c 69 64 54 69 6c 6c | 43 44 50 20 69 6e 20 6d |alidTill|CDP in m|
|000055f0| 61 74 63 68 5f 72 65 67 | 73 0d 09 61 64 64 72 3a |atch_reg|s..addr:|
|00005600| 20 6d 61 74 63 68 5f 72 | 65 67 73 20 20 74 72 75 | match_r|egs tru|
|00005610| 65 0d 3b 0d 0d 0d 3a 20 | 4d 41 54 43 48 3f 20 20 |e.;...: |MATCH? |
|00005620| 7b 20 5e 4f 44 20 63 61 | 6e 42 65 53 70 65 63 69 |{ ^OD ca|nBeSpeci|
|00005630| 61 6c 3f 20 5c 20 6f 70 | 54 79 70 65 20 2d 2d 20 |al? \ op|Type -- |
|00005640| 5e 4f 44 27 20 74 72 75 | 65 20 7c 20 2d 2d 20 66 |^OD' tru|e | -- f|
|00005650| 61 6c 73 65 20 7d 0d 0d | 09 61 6c 6c 6f 77 5f 6d |alse }..|.allow_m|
|00005660| 61 74 63 68 3f 20 20 4e | 49 46 20 20 66 61 6c 73 |atch? N|IF fals|
|00005670| 65 20 20 45 58 49 54 20 | 20 54 48 45 4e 0d 0d 09 |e EXIT | THEN...|
|00005680| 5e 4f 44 20 67 65 74 3a | 20 69 76 61 72 3e 20 6f |^OD get:| ivar> o|
|00005690| 70 54 79 70 65 20 69 6e | 20 4f 44 20 20 2d 3e 20 |pType in| OD -> |
|000056a0| 6f 70 54 79 70 65 0d 09 | 0d 09 6f 70 54 79 70 65 |opType..|..opType|
|000056b0| 20 20 6f 74 46 50 73 74 | 61 72 74 20 6f 74 46 50 | otFPst|art otFP|
|000056c0| 65 6e 64 20 20 77 69 74 | 68 69 6e 3f 20 6e 69 70 |end wit|hin? nip|
|000056d0| 0d 09 49 46 09 09 09 09 | 09 09 09 09 5c 20 69 74 |..IF....|....\ it|
|000056e0| 27 73 20 61 6e 20 46 50 | 20 6f 70 20 2d 20 6a 75 |'s an FP| op - ju|
|000056f0| 73 74 20 63 68 65 63 6b | 20 46 50 52 73 0d 09 09 |st check| FPRs...|
|00005700| 5e 4f 44 20 63 61 6e 42 | 65 53 70 65 63 69 61 6c |^OD canB|eSpecial|
|00005710| 3f 20 20 6d 61 74 63 68 | 3f 3a 20 46 50 52 73 0d |? match|?: FPRs.|
|00005720| 09 09 49 46 20 20 61 64 | 64 72 3a 20 46 50 52 73 |..IF ad|dr: FPRs|
|00005730| 09 74 72 75 65 20 20 45 | 4c 53 45 20 20 66 61 6c |.true E|LSE fal|
|00005740| 73 65 20 20 54 48 45 4e | 20 20 45 58 49 54 0d 09 |se THEN| EXIT..|
|00005750| 54 48 45 4e 0d 0d 09 5e | 4f 44 20 63 61 6e 42 65 |THEN...^|OD canBe|
|00005760| 53 70 65 63 69 61 6c 3f | 20 20 6d 61 74 63 68 3f |Special?| match?|
|00005770| 3a 20 47 50 52 73 09 09 | 49 46 20 20 61 64 64 72 |: GPRs..|IF addr|
|00005780| 3a 20 47 50 52 73 09 74 | 72 75 65 20 20 45 58 49 |: GPRs.t|rue EXI|
|00005790| 54 20 20 54 48 45 4e 0d | 09 5e 4f 44 20 63 61 6e |T THEN.|.^OD can|
|000057a0| 42 65 53 70 65 63 69 61 | 6c 3f 20 20 6d 61 74 63 |BeSpecia|l? matc|
|000057b0| 68 3f 3a 20 43 52 73 09 | 09 49 46 20 20 61 64 64 |h?: CRs.|.IF add|
|000057c0| 72 3a 20 43 52 73 09 74 | 72 75 65 20 20 45 58 49 |r: CRs.t|rue EXI|
|000057d0| 54 20 20 54 48 45 4e 0d | 0d 5c 20 6e 6f 77 20 69 |T THEN.|.\ now i|
|000057e0| 66 20 74 68 65 20 6f 70 | 20 69 73 20 61 20 66 65 |f the op| is a fe|
|000057f0| 74 63 68 2c 20 77 65 20 | 6e 65 65 64 20 74 6f 20 |tch, we |need to |
|00005800| 63 68 65 63 6b 20 66 6f | 72 20 61 20 6d 61 74 63 |check fo|r a matc|
|00005810| 68 20 6f 6e 20 74 68 65 | 20 73 74 6f 72 65 73 20 |h on the| stores |
|00005820| 6f 66 0d 5c 20 20 74 68 | 61 74 20 6b 69 6e 64 20 |of.\ th|at kind |
|00005830| 6f 66 20 72 65 67 69 73 | 74 65 72 2e 20 20 4e 6f |of regis|ter. No|
|00005840| 74 65 20 74 68 61 74 20 | 74 68 65 20 6d 79 52 65 |te that |the myRe|
|00005850| 66 20 69 76 61 72 20 69 | 6e 20 74 68 65 20 70 61 |f ivar i|n the pa|
|00005860| 73 73 65 64 2d 69 6e 20 | 4f 44 0d 5c 20 20 6d 61 |ssed-in |OD.\ ma|
|00005870| 79 20 6e 6f 74 20 62 65 | 20 73 65 74 2c 20 73 6f |y not be| set, so|
|00005880| 20 77 65 20 75 73 65 20 | 6f 70 54 79 70 65 2e 0d | we use |opType..|
|00005890| 0d 09 6f 70 54 79 70 65 | 20 6f 74 46 65 74 63 68 |..opType| otFetch|
|000058a0| 20 3d 0d 09 49 46 09 47 | 50 52 73 20 73 74 6f 72 | =..IF.G|PRs stor|
|000058b0| 65 64 5f 47 50 52 73 20 | 5e 4f 44 20 6f 74 53 74 |ed_GPRs |^OD otSt|
|000058c0| 6f 72 65 20 63 61 6e 42 | 65 53 70 65 63 69 61 6c |ore canB|eSpecial|
|000058d0| 3f 20 6d 61 74 63 68 5f | 73 74 6f 72 65 73 3f 20 |? match_|stores? |
|000058e0| 20 45 58 49 54 20 20 54 | 48 45 4e 0d 09 6f 70 54 | EXIT T|HEN..opT|
|000058f0| 79 70 65 20 6f 74 46 50 | 66 65 74 63 68 20 3d 0d |ype otFP|fetch =.|
|00005900| 09 49 46 20 20 46 50 52 | 73 20 73 74 6f 72 65 64 |.IF FPR|s stored|
|00005910| 5f 46 50 52 73 20 5e 4f | 44 20 6f 74 46 50 73 74 |_FPRs ^O|D otFPst|
|00005920| 6f 72 65 20 63 61 6e 42 | 65 53 70 65 63 69 61 6c |ore canB|eSpecial|
|00005930| 3f 20 6d 61 74 63 68 5f | 73 74 6f 72 65 73 3f 20 |? match_|stores? |
|00005940| 20 45 58 49 54 20 20 54 | 48 45 4e 0d 0d 09 66 61 | EXIT T|HEN...fa|
|00005950| 6c 73 65 0d 3b 0d 0d 0d | 0d 6f 62 6a 50 74 72 09 |lse.;...|.objPtr.|
|00005960| 72 63 52 65 66 09 63 6c | 61 73 73 5f 69 73 20 72 |rcRef.cl|ass_is r|
|00005970| 65 66 65 72 65 6e 63 65 | 0d 0d 3a 66 20 52 45 47 |eference|..:f REG|
|00005980| 5f 43 48 41 4e 47 45 44 | 20 20 7b 20 5e 72 65 66 |_CHANGED| { ^ref|
|00005990| 20 2d 2d 20 7d 0d 09 5e | 72 65 66 20 72 65 67 5f | -- }..^|ref reg_|
|000059a0| 63 68 61 6e 67 65 64 3a | 20 47 50 52 73 0d 09 5e |changed:| GPRs..^|
|000059b0| 72 65 66 20 72 65 67 5f | 63 68 61 6e 67 65 64 3a |ref reg_|changed:|
|000059c0| 20 46 50 52 73 0d 09 5e | 72 65 66 20 72 65 67 5f | FPRs..^|ref reg_|
|000059d0| 63 68 61 6e 67 65 64 3a | 20 43 52 73 0d 09 0d 5c |changed:| CRs...\|
|000059e0| 20 4e 6f 77 20 69 66 20 | 74 68 69 73 20 69 73 20 | Now if |this is |
|000059f0| 61 20 47 50 52 2c 20 77 | 65 20 61 6c 73 6f 20 63 |a GPR, w|e also c|
|00005a00| 6c 6f 62 62 65 72 20 74 | 68 65 20 63 6f 72 72 65 |lobber t|he corre|
|00005a10| 73 70 6f 6e 64 69 6e 67 | 20 65 6c 65 6d 65 6e 74 |sponding| element|
|00005a20| 20 69 6e 0d 5c 20 73 74 | 6f 72 65 64 5f 47 50 52 | in.\ st|ored_GPR|
|00005a30| 73 2c 20 73 69 6e 63 65 | 20 61 6e 79 20 76 61 6c |s, since| any val|
|00005a40| 75 65 20 74 68 61 74 20 | 77 61 73 20 73 74 6f 72 |ue that |was stor|
|00005a50| 65 64 20 69 73 6e 27 74 | 20 69 6e 20 74 68 69 73 |ed isn't| in this|
|00005a60| 20 47 50 52 20 61 6e 79 | 20 6d 6f 72 65 2e 0d 0d | GPR any| more...|
|00005a70| 09 5e 72 65 66 20 2d 3e | 20 72 63 52 65 66 0d 09 |.^ref ->| rcRef..|
|00005a80| 72 65 66 54 79 70 65 3a | 20 72 63 52 65 66 20 20 |refType:| rcRef |
|00005a90| 47 50 52 72 65 66 20 3d | 0d 09 49 46 09 72 65 67 |GPRref =|..IF.reg|
|00005aa0| 3a 20 72 63 52 65 66 20 | 20 73 65 6c 65 63 74 3a |: rcRef | select:|
|00005ab0| 20 73 74 6f 72 65 64 5f | 47 50 52 73 0d 09 09 63 | stored_|GPRs...c|
|00005ac0| 6c 65 61 72 3a 20 69 76 | 61 72 3e 20 6f 70 54 79 |lear: iv|ar> opTy|
|00005ad0| 70 65 20 69 6e 20 73 74 | 6f 72 65 64 5f 47 50 52 |pe in st|ored_GPR|
|00005ae0| 73 0d 09 54 48 45 4e 0d | 3b 66 0d 0d 0d 3a 20 55 |s..THEN.|;f...: U|
|00005af0| 50 44 41 54 45 5f 45 51 | 5f 52 41 4e 47 45 53 0d |PDATE_EQ|_RANGES.|
|00005b00| 09 72 65 73 65 74 3a 20 | 65 71 5f 72 61 6e 67 65 |.reset: |eq_range|
|00005b10| 73 0d 09 42 45 47 49 4e | 0d 09 09 6c 65 6e 3a 20 |s..BEGIN|...len: |
|00005b20| 65 71 5f 72 61 6e 67 65 | 73 20 20 30 45 58 49 54 |eq_range|s 0EXIT|
|00005b30| 0d 09 09 6e 78 74 4c 3a | 20 65 71 5f 72 61 6e 67 |...nxtL:| eq_rang|
|00005b40| 65 73 20 20 73 74 61 72 | 74 43 44 50 20 75 3e 0d |es star|tCDP u>.|
|00005b50| 09 55 4e 54 49 4c 0d 09 | 2d 34 20 73 6b 69 70 3a |.UNTIL..|-4 skip:|
|00005b60| 20 65 71 5f 72 61 6e 67 | 65 73 0d 09 42 45 47 49 | eq_rang|es..BEGI|
|00005b70| 4e 0d 09 09 31 73 74 4c | 3a 20 65 71 5f 72 61 6e |N...1stL|: eq_ran|
|00005b80| 67 65 73 0d 09 09 64 65 | 6c 74 61 43 44 50 20 2b |ges...de|ltaCDP +|
|00005b90| 20 20 3e 6e 78 74 4c 3a | 20 65 71 5f 72 61 6e 67 | >nxtL:| eq_rang|
|00005ba0| 65 73 0d 09 09 6c 65 6e | 3a 20 65 71 5f 72 61 6e |es...len|: eq_ran|
|00005bb0| 67 65 73 0d 09 09 64 75 | 70 20 30 3c 20 69 66 20 |ges...du|p 0< if |
|00005bc0| 2e 20 2e 22 20 20 61 75 | 75 67 67 67 68 21 22 20 |. ." au|ugggh!" |
|00005bd0| 51 55 49 54 20 74 68 65 | 6e 0d 09 4e 55 4e 54 49 |QUIT the|n..NUNTI|
|00005be0| 4c 0d 3b 0d 0d 0d 3a 66 | 20 55 50 44 41 54 45 5f |L.;...:f| UPDATE_|
|00005bf0| 43 44 50 73 09 09 5c 20 | 28 20 73 74 61 72 74 43 |CDPs..\ |( startC|
|00005c00| 44 50 20 64 65 6c 74 61 | 43 44 50 20 2d 2d 20 29 |DP delta|CDP -- )|
|00005c10| 0d 0d 09 2d 3e 20 64 65 | 6c 74 61 43 44 50 20 20 |...-> de|ltaCDP |
|00005c20| 2d 3e 20 73 74 61 72 74 | 43 44 50 0d 09 75 70 64 |-> start|CDP..upd|
|00005c30| 61 74 65 5f 6f 70 43 44 | 50 73 3a 20 47 50 52 73 |ate_opCD|Ps: GPRs|
|00005c40| 0d 09 75 70 64 61 74 65 | 5f 6f 70 43 44 50 73 3a |..update|_opCDPs:|
|00005c50| 20 46 50 52 73 0d 09 75 | 70 64 61 74 65 5f 6f 70 | FPRs..u|pdate_op|
|00005c60| 43 44 50 73 3a 20 43 52 | 73 0d 09 0d 09 75 70 64 |CDPs: CR|s....upd|
|00005c70| 61 74 65 5f 6f 70 43 44 | 50 73 3a 20 73 74 6f 72 |ate_opCD|Ps: stor|
|00005c80| 65 64 5f 47 50 52 73 0d | 09 0d 09 62 61 73 69 63 |ed_GPRs.|...basic|
|00005c90| 5f 62 6c 6f 63 6b 5f 73 | 74 61 72 74 20 20 73 74 |_block_s|tart st|
|00005ca0| 61 72 74 43 44 50 20 75 | 3e 0d 09 49 46 20 20 64 |artCDP u|>..IF d|
|00005cb0| 65 6c 74 61 43 44 50 20 | 2b 2b 3e 20 62 61 73 69 |eltaCDP |++> basi|
|00005cc0| 63 5f 62 6c 6f 63 6b 5f | 73 74 61 72 74 20 20 54 |c_block_|start T|
|00005cd0| 48 45 4e 0d 0d 09 6c 6f | 6f 70 5f 73 74 61 72 74 |HEN...lo|op_start|
|00005ce0| 20 20 73 74 61 72 74 43 | 44 50 20 75 3e 0d 09 49 | startC|DP u>..I|
|00005cf0| 46 20 20 64 65 6c 74 61 | 43 44 50 20 2b 2b 3e 20 |F delta|CDP ++> |
|00005d00| 6c 6f 6f 70 5f 73 74 61 | 72 74 20 20 54 48 45 4e |loop_sta|rt THEN|
|00005d10| 0d 0d 09 75 70 64 61 74 | 65 3a 20 63 6f 6e 74 72 |...updat|e: contr|
|00005d20| 6f 6c 5f 73 74 6b 0d 09 | 75 70 64 61 74 65 5f 65 |ol_stk..|update_e|
|00005d30| 71 5f 72 61 6e 67 65 73 | 0d 09 66 69 78 5f 63 6f |q_ranges|..fix_co|
|00005d40| 6e 74 61 69 6e 69 6e 67 | 5f 6c 6f 6f 70 0d 3b 66 |ntaining|_loop.;f|
|00005d50| 0d 0d 0d 6f 62 6a 50 74 | 72 20 20 4d 53 5f 63 68 |...objPt|r MS_ch|
|00005d60| 65 63 6b 5f 72 65 67 73 | 09 63 6c 61 73 73 5f 69 |eck_regs|.class_i|
|00005d70| 73 20 4f 44 73 5f 63 6c | 61 73 73 0d 0d 3a 66 20 |s ODs_cl|ass..:f |
|00005d80| 63 68 65 63 6b 5f 66 6f | 72 5f 6d 6f 76 65 64 5f |check_fo|r_moved_|
|00005d90| 73 74 6f 72 65 73 20 20 | 7b 20 6f 6c 64 23 20 6e |stores |{ old# n|
|00005da0| 65 77 23 20 5e 72 65 66 | 20 2d 2d 20 7d 0d 0d 09 |ew# ^ref| -- }...|
|00005db0| 5e 72 65 66 20 20 72 65 | 66 54 79 70 65 3a 20 63 |^ref re|fType: c|
|00005dc0| 6c 61 73 73 5f 61 73 3e | 20 72 65 66 65 72 65 6e |lass_as>| referen|
|00005dd0| 63 65 0d 0d 09 53 45 4c | 45 43 54 5b 09 47 50 52 |ce...SEL|ECT[.GPR|
|00005de0| 72 65 66 09 5d 3d 3e 09 | 09 73 74 6f 72 65 64 5f |ref.]=>.|.stored_|
|00005df0| 47 50 52 73 20 2d 3e 20 | 4d 53 5f 63 68 65 63 6b |GPRs -> |MS_check|
|00005e00| 5f 72 65 67 73 0d 09 09 | 20 20 5b 09 46 50 52 72 |_regs...| [.FPRr|
|00005e10| 65 66 09 5d 3d 3e 09 09 | 73 74 6f 72 65 64 5f 46 |ef.]=>..|stored_F|
|00005e20| 50 52 73 20 2d 3e 20 4d | 53 5f 63 68 65 63 6b 5f |PRs -> M|S_check_|
|00005e30| 72 65 67 73 0d 09 09 09 | 20 20 44 45 46 41 55 4c |regs....| DEFAUL|
|00005e40| 54 3d 3e 20 20 64 72 6f | 70 20 20 45 58 49 54 0d |T=> dro|p EXIT.|
|00005e50| 09 5d 53 45 4c 45 43 54 | 0d 0d 09 6f 6c 64 23 20 |.]SELECT|...old# |
|00005e60| 73 65 6c 65 63 74 3a 20 | 4d 53 5f 63 68 65 63 6b |select: |MS_check|
|00005e70| 5f 72 65 67 73 0d 09 67 | 65 74 3a 20 69 76 61 72 |_regs..g|et: ivar|
|00005e80| 3e 20 6f 70 54 79 70 65 | 20 69 6e 20 4d 53 5f 63 |> opType| in MS_c|
|00005e90| 68 65 63 6b 5f 72 65 67 | 73 20 20 6f 74 53 74 6f |heck_reg|s otSto|
|00005ea0| 72 65 20 3d 0d 09 49 46 | 0d 09 09 6e 65 77 23 20 |re =..IF|...new# |
|00005eb0| 30 3e 3d 0d 09 09 49 46 | 0d 09 09 09 64 65 62 75 |0>=...IF|....debu|
|00005ec0| 67 3f 20 69 66 0d 09 09 | 09 09 63 72 0d 2e 22 20 |g? if...|..cr.." |
|00005ed0| 6d 6f 76 69 6e 67 20 61 | 20 73 74 6f 72 65 20 73 |moving a| store s|
|00005ee0| 69 6e 63 65 20 73 6f 75 | 72 63 65 20 72 65 67 20 |ince sou|rce reg |
|00005ef0| 68 61 73 20 6d 6f 76 65 | 64 20 66 72 6f 6d 20 22 |has move|d from "|
|00005f00| 20 6f 6c 64 23 20 2e 20 | 2e 22 20 74 6f 20 22 20 | old# . |." to " |
|00005f10| 6e 65 77 23 20 2e 20 63 | 72 0d 09 09 09 74 68 65 |new# . c|r....the|
|00005f20| 6e 0d 0d 09 09 09 61 64 | 64 72 3a 20 4d 53 5f 63 |n.....ad|dr: MS_c|
|00005f30| 68 65 63 6b 5f 72 65 67 | 73 0d 09 09 09 6e 65 77 |heck_reg|s....new|
|00005f40| 23 20 73 65 6c 65 63 74 | 3a 20 4d 53 5f 63 68 65 |# select|: MS_che|
|00005f50| 63 6b 5f 72 65 67 73 0d | 09 09 09 63 6f 70 79 57 |ck_regs.|...copyW|
|00005f60| 69 74 68 43 44 50 3a 20 | 4d 53 5f 63 68 65 63 6b |ithCDP: |MS_check|
|00005f70| 5f 72 65 67 73 0d 09 09 | 09 72 65 63 6f 6d 70 69 |_regs...|.recompi|
|00005f80| 6c 65 3a 20 4d 53 5f 63 | 68 65 63 6b 5f 72 65 67 |le: MS_c|heck_reg|
|00005f90| 73 0d 09 09 09 6f 6c 64 | 23 20 73 65 6c 65 63 74 |s....old|# select|
|00005fa0| 3a 20 4d 53 5f 63 68 65 | 63 6b 5f 72 65 67 73 0d |: MS_che|ck_regs.|
|00005fb0| 09 09 54 48 45 4e 0d 09 | 09 63 6c 65 61 72 3a 20 |..THEN..|.clear: |
|00005fc0| 69 76 61 72 3e 20 6f 70 | 54 79 70 65 20 69 6e 20 |ivar> op|Type in |
|00005fd0| 4d 53 5f 63 68 65 63 6b | 5f 72 65 67 73 0d 09 54 |MS_check|_regs..T|
|00005fe0| 48 45 4e 0d 3b 66 0d 0d | 0d 66 61 6c 73 65 09 76 |HEN.;f..|.false.v|
|00005ff0| 61 6c 75 65 09 55 53 49 | 4e 47 5f 43 52 30 0d 0d |alue.USI|NG_CR0..|
|00006000| 0d 28 2a 20 4d 4f 56 45 | 5f 43 52 5f 42 49 54 20 |.(* MOVE|_CR_BIT |
|00006010| 6d 6f 76 65 73 20 61 20 | 62 69 74 20 69 6e 20 74 |moves a |bit in t|
|00006020| 68 65 20 43 52 20 66 72 | 6f 6d 20 6f 6e 65 20 70 |he CR fr|om one p|
|00006030| 6f 73 69 74 69 6f 6e 20 | 74 6f 20 61 6e 6f 74 68 |osition |to anoth|
|00006040| 65 72 2e 0d 20 20 20 4e | 6f 74 65 20 74 68 61 74 |er.. N|ote that|
|00006050| 20 77 65 20 63 61 6e 27 | 74 20 64 6f 20 74 68 69 | we can'|t do thi|
|00006060| 73 20 62 79 20 72 65 63 | 6f 6d 70 69 6c 69 6e 67 |s by rec|ompiling|
|00006070| 20 74 68 65 20 6f 70 2c | 20 73 69 6e 63 65 20 74 | the op,| since t|
|00006080| 68 65 20 6f 70 0d 20 20 | 20 77 61 73 20 61 20 63 |he op. | was a c|
|00006090| 6f 6d 70 61 72 65 20 6f | 72 20 61 6e 20 61 72 69 |ompare o|r an ari|
|000060a0| 74 68 20 69 6e 73 74 72 | 75 63 74 69 6f 6e 20 74 |th instr|uction t|
|000060b0| 68 61 74 20 6e 65 63 65 | 73 73 61 72 69 6c 79 20 |hat nece|ssarily |
|000060c0| 70 75 74 20 74 68 65 0d | 20 20 20 62 69 74 20 77 |put the.| bit w|
|000060d0| 68 65 72 65 20 69 74 20 | 65 6e 64 65 64 20 75 70 |here it |ended up|
|000060e0| 20 28 65 78 63 65 70 74 | 20 66 6f 72 20 74 68 65 | (except| for the|
|000060f0| 20 6f 6e 65 20 63 61 73 | 65 20 77 68 65 72 65 20 | one cas|e where |
|00006100| 69 74 20 77 61 73 20 61 | 0d 20 20 20 74 65 73 74 |it was a|. test|
|00006110| 20 66 6f 72 20 74 68 65 | 20 53 41 4d 45 20 63 6f | for the| SAME co|
|00006120| 6e 64 69 74 69 6f 6e 20 | 77 68 69 63 68 20 68 61 |ndition |which ha|
|00006130| 70 70 65 6e 65 64 20 74 | 6f 20 62 65 20 73 65 6e |ppened t|o be sen|
|00006140| 74 20 74 6f 20 61 20 64 | 69 66 66 65 72 65 6e 74 |t to a d|ifferent|
|00006150| 0d 20 20 20 43 52 20 66 | 69 65 6c 64 29 2e 0d 20 |. CR f|ield).. |
|00006160| 20 20 54 68 65 20 6d 6f | 76 65 20 63 61 6e 20 62 | The mo|ve can b|
|00006170| 65 20 64 6f 6e 65 20 69 | 6e 20 6f 6e 65 20 69 6e |e done i|n one in|
|00006180| 73 74 72 75 63 74 69 6f | 6e 20 2d 20 65 69 74 68 |structio|n - eith|
|00006190| 65 72 20 61 20 63 72 6f | 72 20 6f 72 20 63 72 6e |er a cro|r or crn|
|000061a0| 6f 72 0d 20 20 20 64 65 | 70 65 6e 64 69 6e 67 20 |or. de|pending |
|000061b0| 6f 6e 20 77 68 65 74 68 | 65 72 20 74 68 65 20 31 |on wheth|er the 1|
|000061c0| 5f 69 73 5f 74 72 75 65 | 3f 20 62 69 74 20 69 73 |_is_true|? bit is|
|000061d0| 20 74 68 65 20 73 61 6d | 65 20 6f 72 20 64 69 66 | the sam|e or dif|
|000061e0| 66 65 72 65 6e 74 2e 0d | 2a 29 0d 0d 3a 20 4d 4f |ferent..|*)..: MO|
|000061f0| 56 45 5f 43 52 5f 42 49 | 54 20 20 7b 20 73 72 63 |VE_CR_BI|T { src|
|00006200| 52 65 66 20 64 73 74 52 | 65 66 20 5c 20 77 68 69 |Ref dstR|ef \ whi|
|00006210| 63 68 53 72 63 42 69 74 | 20 77 68 69 63 68 44 73 |chSrcBit| whichDs|
|00006220| 74 42 69 74 20 2d 2d 20 | 7d 0d 09 64 65 62 75 67 |tBit -- |}..debug|
|00006230| 3f 20 69 66 0d 09 09 2e | 22 20 6d 6f 76 65 5f 63 |? if....|" move_c|
|00006240| 72 5f 62 69 74 20 63 61 | 6c 6c 65 64 20 77 69 74 |r_bit ca|lled wit|
|00006250| 68 3a 20 22 20 20 70 72 | 69 6e 74 3a 20 5b 20 73 |h: " pr|int: [ s|
|00006260| 72 63 52 65 66 20 5d 20 | 20 70 72 69 6e 74 3a 20 |rcRef ] | print: |
|00006270| 5b 20 64 73 74 52 65 66 | 20 5d 20 63 72 0d 09 74 |[ dstRef| ] cr..t|
|00006280| 68 65 6e 0d 0d 09 66 61 | 6c 73 65 20 2d 3e 20 63 |hen...fa|lse -> c|
|00006290| 68 65 63 6b 5f 4f 50 5f | 73 74 6f 72 65 73 3f 09 |heck_OP_|stores?.|
|000062a0| 5c 20 63 6c 61 73 73 65 | 73 20 6d 69 67 68 74 6e |\ classe|s mightn|
|000062b0| 27 74 20 6d 61 74 63 68 | 20 28 6d 69 67 68 74 20 |'t match| (might |
|000062c0| 62 65 20 63 73 74 6b 29 | 0d 09 09 09 09 09 09 09 |be cstk)|........|
|000062d0| 09 5c 20 20 62 75 74 20 | 64 6f 65 73 6e 27 74 20 |.\ but |doesn't |
|000062e0| 6d 61 74 74 65 72 20 68 | 65 72 65 0d 09 73 72 63 |matter h|ere..src|
|000062f0| 52 65 66 20 2d 3e 20 61 | 52 65 66 0d 09 64 73 74 |Ref -> a|Ref..dst|
|00006300| 52 65 66 20 2d 3e 20 61 | 52 65 66 32 0d 09 74 72 |Ref -> a|Ref2..tr|
|00006310| 75 65 20 2d 3e 20 63 68 | 65 63 6b 5f 4f 50 5f 73 |ue -> ch|eck_OP_s|
|00006320| 74 6f 72 65 73 3f 0d 0d | 09 63 6c 65 61 72 3a 20 |tores?..|.clear: |
|00006330| 69 6e 73 74 72 6e 0d 09 | 31 39 20 3e 70 72 69 6d |instrn..|19 >prim|
|00006340| 4f 70 3a 20 69 6e 73 74 | 72 6e 0d 09 31 5f 69 73 |Op: inst|rn..1_is|
|00006350| 5f 74 72 75 65 3f 3a 20 | 61 52 65 66 20 20 31 5f |_true?: |aRef 1_|
|00006360| 69 73 5f 74 72 75 65 3f | 3a 20 61 52 65 66 32 20 |is_true?|: aRef2 |
|00006370| 20 3d 0d 09 49 46 09 09 | 34 34 39 09 09 09 09 09 | =..IF..|449.....|
|00006380| 5c 20 63 72 6f 72 0d 09 | 45 4c 53 45 09 33 33 09 |\ cror..|ELSE.33.|
|00006390| 09 09 09 09 5c 20 63 72 | 6e 6f 72 0d 09 54 48 45 |....\ cr|nor..THE|
|000063a0| 4e 20 20 3e 73 65 63 4f | 70 3a 20 69 6e 73 74 72 |N >secO|p: instr|
|000063b0| 6e 0d 09 72 65 67 3a 20 | 61 52 65 66 20 20 34 2a |n..reg: |aRef 4*|
|000063c0| 20 20 62 69 74 23 3a 20 | 61 52 65 66 20 20 6f 72 | bit#: |aRef or|
|000063d0| 20 20 2d 3e 20 77 68 69 | 63 68 53 72 63 42 69 74 | -> whi|chSrcBit|
|000063e0| 0d 09 72 65 67 3a 20 61 | 52 65 66 32 20 34 2a 20 |..reg: a|Ref2 4* |
|000063f0| 20 62 69 74 23 3a 20 61 | 52 65 66 32 20 6f 72 20 | bit#: a|Ref2 or |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.